using System.Threading; using System.Threading.Tasks; namespace Implab.Messaging { public interface IConsumer { T Receive(CancellationToken ct); Task ReceiveAsync(CancellationToken ct); bool TryReceive(out T message); } }