Can someone tell me whether MSMQ (using transactions) supports competing consumers? Basically, I have multiple threads dequeueing messages off of a single queue. Just wanted to make sure this will work since MSMQ sometimes behaves differently than I expect.
Kafka, RabbitMQ, IBM MQ, Azure Service Bus, and ActiveMQ are the most popular alternatives and competitors to MSMQ.
As a Windows component, MSMQ is technically “supported” as long as it's carried by a supported version of Windows. Since it exists in Windows 10 and Windows Server 2019, MSMQ will continue to live on until at least 2029—and much longer assuming it isn't removed from future versions of Windows. The System.
MSMQ is essentially a messaging protocol that allows applications running on separate servers/processes to communicate in a failsafe manner. A queue is a temporary storage location from which messages can be sent and received reliably, as and when conditions permit.
If you are calling Receive from multiple processes on the same machine on the same queue, you will not get the same message more than once -- unless you rollback a transaction from a read.
If you are using 2008/w7 and are receiving on multiple machines from the same remote queue within a transaction, you should not see the same message twice (again, unless you roll back).
If you are using an enumerator to peek the messages and then remove an interesting one (via RemoveCurrent), you should expect to see an exception that the message has already been removed if another consumer has picked it up.
If you are on 2003/XP, you cannot do remote receives in a transaction so all bets are off there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With