Skip to content

NonTransactionalRouter

busterwood edited this page Jan 2, 2018 · 4 revisions

Create a NonTransactionalRouter to read an input non-transactional queue and send messages onto a destination queue.

Properties:

  • PeekProperties the properties used when peeking for messages
  • UnroutableSubQueue the subqueue to move messages to on error or if the router function returns null.
  • BadMessageHandler used to override change the behaviour of handling messages that cannot be routed.

Methods:

  • StartAsync() starts the router
  • StopAsync() stops the router
  • Dipose() also stops the router

The NonTransactionalRouter constructor takes an router argument of type Func<Message, QueueWriter> that is used to determine where to move the message to.

Note that you may like to use a QueueCache when routing messages to large numbers of destination queues.

Routing a message to multiple destinations

To route messages to multiple destination queues the router function should return a QueueWriter that sends to multiple destinations, e.g. multicast, distribution list or multi-element format name.

Clone this wiki locally