Interface IMessageRequestReplyOperations<D>
Operations for sending messages to and receiving the reply from a destination.
public interface IMessageRequestReplyOperations<D>
Type Parameters
D
the type of the destination
Methods
ConvertSendAndReceiveAsync<T>(object, IMessagePostProcessor, CancellationToken)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to a default destination after applying the post processor, receive the reply and convert its body to the specified target type.
Task<T> ConvertSendAndReceiveAsync<T>(object request, IMessagePostProcessor requestPostProcessor, CancellationToken cancellationToken = default)
Parameters
request
objectpayload for the request message to send
requestPostProcessor
IMessagePostProcessorthe post processor to apply
cancellationToken
CancellationTokentoken used to signal cancelation
Returns
- Task<T>
a task to signal completion
Type Parameters
T
the target type of the reply
ConvertSendAndReceiveAsync<T>(object, CancellationToken)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to a default destination, receive the reply and convert its body to the specified target type.
Task<T> ConvertSendAndReceiveAsync<T>(object request, CancellationToken cancellationToken = default)
Parameters
request
objectpayload for the request message to send
cancellationToken
CancellationTokentoken used to signal cancelation
Returns
- Task<T>
a task to signal completion
Type Parameters
T
the target type of the payload
ConvertSendAndReceiveAsync<T>(D, object, IMessagePostProcessor, CancellationToken)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to the specified destination after applying the post processor, receive the reply and convert its body to the specified target type.
Task<T> ConvertSendAndReceiveAsync<T>(D destination, object request, IMessagePostProcessor requestPostProcessor, CancellationToken cancellationToken = default)
Parameters
destination
Dthe target destination
request
objectpayload for the request message to send
requestPostProcessor
IMessagePostProcessorthe post processor to apply
cancellationToken
CancellationTokentoken used to signal cancelation
Returns
- Task<T>
a task to signal completion
Type Parameters
T
the target type of the reply
ConvertSendAndReceiveAsync<T>(D, object, IDictionary<string, object>, IMessagePostProcessor, CancellationToken)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to the specified destination after applying the post processor, with the specified headers, receive the reply and convert its body to the specified target type.
Task<T> ConvertSendAndReceiveAsync<T>(D destination, object request, IDictionary<string, object> headers, IMessagePostProcessor requestPostProcessor, CancellationToken cancellationToken = default)
Parameters
destination
Dthe target destination
request
objectpayload for the request message to send
headers
IDictionary<string, object>the headers to send
requestPostProcessor
IMessagePostProcessorthe post processor to apply
cancellationToken
CancellationTokentoken used to signal cancelation
Returns
- Task<T>
a task to signal completion
Type Parameters
T
the target type of the reply
ConvertSendAndReceiveAsync<T>(D, object, IDictionary<string, object>, CancellationToken)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to a specified destination with the given headers, receive the reply and convert its body to the specified target type.
Task<T> ConvertSendAndReceiveAsync<T>(D destination, object request, IDictionary<string, object> headers, CancellationToken cancellationToken = default)
Parameters
destination
Dthe target destination
request
objectpayload for the request message to send
headers
IDictionary<string, object>the headers to send
cancellationToken
CancellationTokentoken used to signal cancelation
Returns
- Task<T>
a task to signal completion
Type Parameters
T
the target type of the payload
ConvertSendAndReceiveAsync<T>(D, object, CancellationToken)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to a specified destination, receive the reply and convert its body to the specified target type.
Task<T> ConvertSendAndReceiveAsync<T>(D destination, object request, CancellationToken cancellationToken = default)
Parameters
destination
Dthe target destination
request
objectpayload for the request message to send
cancellationToken
CancellationTokentoken used to signal cancelation
Returns
- Task<T>
a task to signal completion
Type Parameters
T
the target type of the payload
ConvertSendAndReceive<T>(object)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to a default destination, receive the reply and convert its body to the specified target type.
T ConvertSendAndReceive<T>(object request)
Parameters
request
objectpayload for the request message to send
Returns
- T
the receieved message; or null
Type Parameters
T
the target type of the payload
ConvertSendAndReceive<T>(object, IMessagePostProcessor)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to a default destination after applying the post processor, receive the reply and convert its body to the specified target type.
T ConvertSendAndReceive<T>(object request, IMessagePostProcessor requestPostProcessor)
Parameters
request
objectpayload for the request message to send
requestPostProcessor
IMessagePostProcessorthe post processor to apply
Returns
- T
the receieved message; or null
Type Parameters
T
the target type of the reply
ConvertSendAndReceive<T>(D, object)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to a specified destination, receive the reply and convert its body to the specified target type.
T ConvertSendAndReceive<T>(D destination, object request)
Parameters
destination
Dthe target destination
request
objectpayload for the request message to send
Returns
- T
the receieved message; or null
Type Parameters
T
the target type of the payload
ConvertSendAndReceive<T>(D, object, IMessagePostProcessor)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to the specified destination after applying the post processor, receive the reply and convert its body to the specified target type.
T ConvertSendAndReceive<T>(D destination, object request, IMessagePostProcessor requestPostProcessor)
Parameters
destination
Dthe target destination
request
objectpayload for the request message to send
requestPostProcessor
IMessagePostProcessorthe post processor to apply
Returns
- T
the receieved message; or null
Type Parameters
T
the target type of the reply
ConvertSendAndReceive<T>(D, object, IDictionary<string, object>)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to a specified destination with the given headers, receive the reply and convert its body to the specified target type.
T ConvertSendAndReceive<T>(D destination, object request, IDictionary<string, object> headers)
Parameters
destination
Dthe target destination
request
objectpayload for the request message to send
headers
IDictionary<string, object>the headers to send
Returns
- T
the receieved message; or null
Type Parameters
T
the target type of the payload
ConvertSendAndReceive<T>(D, object, IDictionary<string, object>, IMessagePostProcessor)
Convert the given request object to serialized form, possibly using a message converter, send it as a message to the specified destination after applying the post processor, with the specified headers, receive the reply and convert its body to the specified target type.
T ConvertSendAndReceive<T>(D destination, object request, IDictionary<string, object> headers, IMessagePostProcessor requestPostProcessor)
Parameters
destination
Dthe target destination
request
objectpayload for the request message to send
headers
IDictionary<string, object>the headers to send
requestPostProcessor
IMessagePostProcessorthe post processor to apply
Returns
- T
the receieved message; or null
Type Parameters
T
the target type of the reply
SendAndReceive(IMessage)
Send a request message and receive the reply from a default destination.
IMessage SendAndReceive(IMessage requestMessage)
Parameters
requestMessage
IMessagethe message to send
Returns
- IMessage
the receieved message; or null
SendAndReceive(D, IMessage)
Send a request message and receive the reply from the given destination.
IMessage SendAndReceive(D destination, IMessage requestMessage)
Parameters
destination
Dthe target destination
requestMessage
IMessagethe message to send
Returns
- IMessage
the receieved message; or null
SendAndReceiveAsync(IMessage, CancellationToken)
Send a request message and receive the reply from a default destination.
Task<IMessage> SendAndReceiveAsync(IMessage requestMessage, CancellationToken cancellationToken = default)
Parameters
requestMessage
IMessagethe message to send
cancellationToken
CancellationTokentoken used to signal cancelation
Returns
SendAndReceiveAsync(D, IMessage, CancellationToken)
Send a request message and receive the reply from the given destination.
Task<IMessage> SendAndReceiveAsync(D destination, IMessage requestMessage, CancellationToken cancellationToken = default)
Parameters
destination
Dthe target destination
requestMessage
IMessagethe message to send
cancellationToken
CancellationTokentoken used to signal cancelation