-
Notifications
You must be signed in to change notification settings - Fork 0
ISendMessages
The ISendMessages
interface should be implemented to allow Rebus to send messages.
The implementor should be able to take a TransportMessageToSend
, possibly look at the headers dictionary and maybe even add/remove some values, maybe add some semantics to certain keys, and then ship the message to the specified endpoint.
An example on adding semantics is when the rebus-time-to-be-received
(see https://github.com/mookid8000/Rebus/blob/master/src/Rebus/Shared/Headers.cs) has been set - in this case, the implementor should let the infrastructure expire the message after the specified timeout has elapsed.
Please note that even though message transportation is divided into separate ISendMessages
and [[IReceiveMessages]]
interfaces, some functionality requires that they both refer to the same transport - e.g. the ISendMessages
implementation will be used to moved a failing message to the error queue, but that message was received via IReceiveMessages
.
Generally speaking, you have to be really aware of what you're doing if you configure the bus to use different transport mechanisms for sending and receiving messages.