Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

nservicebus

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?

like image 815
skb Avatar asked Aug 18 '10 18:08

skb


People also ask

What is the purpose of NServiceBus?

NServiceBus is a commercial messaging framework provided by Particular Software. It's built on top of Azure Service Bus and helps developers focus on business logic by abstracting infrastructure concerns.

What is endpoint in NServiceBus?

An endpoint is a logical component that communicates with other components using messages. Each endpoint has an identifying name, contains a collection of message handlers and/or sagas, and is deployed to a given environment (e.g. development, testing, production).


1 Answers

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!

like image 144
Andreas Öhlund Avatar answered Oct 25 '22 14:10

Andreas Öhlund