0

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?

Akshay
  • 121
  • 1
  • 1
  • 10

1 Answers1

1

"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.

John Breakwell
  • 4,667
  • 20
  • 25
  • so what could be the reason behind this ? Any network issue ? Because i am not able to identify the reason behind delay. And they are blaming application coding for the delay – Akshay Jul 18 '17 at 03:16
  • 1
    You need to collect data to determine if delay is in sending app, MSMQ-MSMQ movement across network, or in receiving app. If you enable source and destination journaling, you will have timestamp data showing when messages are moved around MSMQ. Coupled with timestamps generated by ending and receiving apps, picture should become clearer. Performance Monitor very useful for showing queue usage graphically. Network tracing useful for problems between machines, – John Breakwell Jul 19 '17 at 08:51