NServiceBus: What happens to a published message if my subscriber machine is powered off?
Asked Answered
S

1

7

With simple Pub/Sub in NServiceBus, I know that if my subscriber app is not running, then the published messages will just accumulate in the queue until they can be processed. But where do they accumulate if the entire machine is down? Since the message can't even be delivered to my subscriber queue, is there some queue where they sit on the publisher? I would like to be able to see what messages are waiting on the publisher when the subscriber machine is down.

Is there any way to see them?

Simmonds answered 18/8, 2010 at 18:34 Comment(0)
G
8

Msmq, the default transport for NServiceBus, uses the store and forward pattern to deliver messages. That means that when you send a message to another machine it's first "stored" on the machine that sends the message and then "forwarded" to the recipient machine. This means that outgoing messages to unreachable machines will be stored on the sending machine until they can be delivered. Msmq uses the terminology of "outgoing queues" for temporary storage of messages that are being delivered. If the receiving machine is down the message will sit in the "outgoing queue" until it can be delivered. If you look at the "Message Queuing" MMC plugin you will find a folder called "Outgoing Queues", this is where your published messages will show up if the subscriber is down.

IMO, the best resource for info on Msmq is John Breakwells blog: http://blogs.msdn.com/b/johnbreakwell/archive/tags/msmq/

More info on NServiceBus combined with Msmq:

http://docs.particular.net/nservicebus/msmq/

Hope this helps!

Glutelin answered 18/8, 2010 at 20:22 Comment(1)
Just as a clarification point: the question is about NServiceBus. It so happens that the default transport used by NServiceBus is MSMQ. nservicebus.com/Msmq.aspxLicense

© 2022 - 2024 — McMap. All rights reserved.