Q:

Rebus Send method doesn't throw an exception when queue doesn't exist

I noticed that Send(TCommand) method doesn't throw an exception if queue doesn't exist. I wanted to ask is it desired behaviour?
In the output I can see first chance exceptions though, but I can't find place where it is handled in Rebus code.
Also I believe it doesn't create missing queue for some good reasons, am I right? :)
Wouldn't it be nice to also throw exception if destination queue is not transactional?
Thanks in advance

A:

Since you're saying "transactional" about a queue, I'm assuming that you're using MSMQ.
With MSMQ, you'll get an exception if the destination queue does not exist only when the queue is local - if the queue is on another machine, that simply cannot happen, because messages destined for other machines are put in a local outgoing queue.
In fact, you can send to any queue on machines that don't exist, and you'll get no error - the message will end up stored in an outgoing queue on the local machine. After a while, MSMQ will give up trying to deliver the message, and it will be moved to the dead-letter queue where it will be safely stored until you delete it (or send it somewhere else, using e.g. Rebus Snoop).
When I tried to reproduce this issue with this code, I got the following result (as expected):

Another thing: If the recipient queue is non-transactional, you'll experience no error when sending - but the message (as always) is not lost! - it's just residing in the transactional dead-letter queue, waiting for operations to understand that there is a problem:

IMO it doesn't make sense to check whether recipient queues are transactional since recipient queues do not belong to the sender and thus should not impose their problems on the sender.

