Table of Contents

Interface IMessageReceivingOperations<D>

Namespace
Steeltoe.Messaging.Core
Assembly
Steeltoe.Messaging.Abstractions.dll

Operations for receiving messages from a destination.

public interface IMessageReceivingOperations<D>

Type Parameters

D

the type of the destination

Methods

Receive()

Receive a message from a default destination

IMessage Receive()

Returns

IMessage

the received message; or null

Receive(D)

Receive a message from the given destination

IMessage Receive(D destination)

Parameters

destination D

the target destination

Returns

IMessage

the received message; or null

ReceiveAndConvertAsync<T>(CancellationToken)

Receive a message from a default destination and convert its payload to the specified target type.

Task<T> ReceiveAndConvertAsync<T>(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<T>

a task to signal completion

Type Parameters

T

the type of the payload

ReceiveAndConvertAsync<T>(D, CancellationToken)

Receive a message from the given destination and convert its payload to the specified target type.

Task<T> ReceiveAndConvertAsync<T>(D destination, CancellationToken cancellationToken = default)

Parameters

destination D

the target destination

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<T>

a task to signal completion

Type Parameters

T

the type of the payload

ReceiveAndConvert<T>()

Receive a message from a default destination and convert its payload to the specified target type.

T ReceiveAndConvert<T>()

Returns

T

the received message; or null

Type Parameters

T

the type of the payload

ReceiveAndConvert<T>(D)

Receive a message from the given destination and convert its payload to the specified target type.

T ReceiveAndConvert<T>(D destination)

Parameters

destination D

the target destination

Returns

T

the received message; or null

Type Parameters

T

the type of the payload

ReceiveAsync(CancellationToken)

Receive a message from a default destination

Task<IMessage> ReceiveAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<IMessage>

a task to signal completion

ReceiveAsync(D, CancellationToken)

Receive a message from the given destination

Task<IMessage> ReceiveAsync(D destination, CancellationToken cancellationToken = default)

Parameters

destination D

the target destination

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<IMessage>

a task to signal completion