1

So...this one's got me baffled.

The target queue lives on ServerA where MSMQ is running in Workgroup mode. The queue is a non-transactional, private queue, with Full rights on pretty much the world (including NETWORK SERVICE, but EXCLUDING ANONYMOUS LOGON).

I'm specifying the queue address as such: FormatName:DIRECT=OS:ServerA\private$\targetqueue.

If I'm interested in sending "fire-and-forget"-style (no need for transaction as there is no other persistence going on), I would assume it would be fine to simply call:

Message message = ConstructMessageWithObjectPayload(serializableObject);
using (MessageQueue queue = new MessageQueue(queueAddress))
{
    queue.Send(message);
} 

But strangely, the message never arrives in the target queue and enabling negative source journaling (which interestingly enough causes the message to be sent to the Dead-letter messages queue on the target server) tells me that it is a "Nontransactional message".

Consequently, using

queue.Send(message, MessageQueueTransactionType.Single);

works! Having a hard time wrapping my head around this. What am I missing?

Also, I've seen a good number of posts by others where their similar problem was solved by giving ANONYMOUS LOGIN Full rights. In what scenario is this necessary? Giving NETWORK SERVICE access somewhat made sense because that is the account that MSMQ itself runs under. If running in Workgroup mode like I am, is it necessary at all to assign rights to Everyone or even the account that my process runs under?

Appreciate the help!

tMole
  • 41
  • 3
  • This is very strange behavior - adding a transaction scope to the message should only be used if the queue is transactional. Are you sure the queue is non-transactional? – tom redfern Jan 28 '15 at 12:02

0 Answers0