Akshay
Akshay

Reputation: 123

asp.net msmq send request shows success but receives message late on msmq

I am sending data to msmq from asp .net application, and it sends success but it takes time to receive the message at destination msmq (packet receives but it takes time around 5/10 min not always but sometimes)

Here is code that i am using to send data to msmq

MessageQueue queue = new MessageQueue("FormatName:Direct=TCP:my_ip\private$\msmqname_name");
queue.Formatter = new BinaryMessageFormatter(FormatterAssemblyStyle.Simple, FormatterTypeStyle.typesWhenNeeded);
System.Messaging.Message msg = new System.Messaging.Message();
msg.BodyStream = new MemoryStream(System.Text.ASCIIEncoding.ASCII.GetBytes("message"));
queue.send(msg,"LABEL");

Note : Above code send data to queue. but it takes time (5/10 minutes.) this behaviour is not regular it happens sometimes. What could be the reason?

Upvotes: 0

Views: 342

Answers (1)

John Breakwell
John Breakwell

Reputation: 4687

"Send success" just means message was successfully created in the outgoing queue. MSMQ then has to create a network connection to the machine with My_IP to deliver the message. The status of the outgoing queue shows if the connection is established or not.

Upvotes: 1

Related Questions