Interface IPollableChannel
A MessageChannel from which messages may be actively received through polling
Inherited Members
Namespace: Steeltoe.Messaging
Assembly: Steeltoe.Messaging.Abstractions.dll
Syntax
public interface IPollableChannel : IMessageChannel
Methods
| Edit this page View SourceReceive()
Receive a message from this channel, blocking forever if necessary.
Declaration
IMessage Receive()
Returns
Type | Description |
---|---|
IMessage | the message |
Receive(Int32)
Receive a message from this channel, blocking until either a message is available or the specified timeout period elapses.
Declaration
IMessage Receive(int timeout)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | timeout | the timeout value in milliseconds |
Returns
Type | Description |
---|---|
IMessage | the message or null |
ReceiveAsync(CancellationToken)
Receive a message from this channel
Declaration
ValueTask<IMessage> ReceiveAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | token used to signal cancelation |
Returns
Type | Description |
---|---|
ValueTask<IMessage> | a task to signal completion |