My bottleneck application began to send and receive messages through MSMQ using MassTransit. Sending and receiving occurs in one application, but often there are too many messages to use the queue in memory.
Here is my simple queue setup:
messageBus = ServiceBusFactory.New(sbc => { sbc.UseMsmq(); sbc.VerifyMsmqConfiguration(); sbc.UseMulticastSubscriptionClient(); sbc.ReceiveFrom("msmq://localhost/msg_queue"); sbc.Subscribe(subs => { subs.Handler<EventMessage>(msg => Enqueue(msg)); }); });
In my experiments, MSMQ currently has ~ 1 million messages, and we do not click on it with any new messages. We do no work in Enqueue() except how fast messages are sent.
With this information, we can only receive from 150 to 200 messages per second from MSMQ when I was hoping it would be at least 1000 messages per second when there is no network latency. Each message is <2kb.
How can we speed up how quickly MSMQ transfers messages to the application through MassTransit while keeping the message ordering in the queue?
Chris
source share