Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have an ongoing problem with message writes to MSMQ being very slow. Our queue is on Windows Server 2008 SP2. The queue is a public queue, addressed at "servername\queuename".

The code to send a message to the queue is

MessageQueue queue = new MessageQueue(Settings.Default.DefaultDestinationQueue);
queue.Formatter = new BinaryMessageFormatter();

queue.Send(message);

The message that we're trying to send is simply a "PublishMessage", as follows:

[Serializable]
public class PublishMessage {
    public int EntryId {get; set; }
}

We're seeing the messages actually reach the queue, but logging before and after shows that it's generally taking in excess of 1 minute for each message.

At this time, we can't see anything wrong with our queue configuration, but are not queuing experts--this is the first addition to this application. Anyone have any ideas?

Edit: Our server is running SP 2 (not SP1 that I originally stated). Running an instance directly on the machine hosting the queue is fast, any other is not.

Note: I've crossposted this at http://stackoverflow.com/questions/6083070/msmq-write-taking-1-minute

share|improve this question

3 Answers 3

I'm not sure if it would work the same but you could try mqsend (from http://www.cogin.com/mq/freetools.php ) and see if that also takes 1 min to send. At least if it doesn't take a min, you'd know it wasn't the server.

You can slo try MQbench and some of the other steps in this technet article

share|improve this answer

Could you please clarify "logging before and after shows that it's generally taking in excess of 1 minute for each message." Are you logging directly before and after the send() ? Or is there more code in between the two logging lines? The send() passes the message to the local queue manager to deliver to the remote queue manager. Any logging will just show when the message went into the outgoing queue and not when it was delivered.

I would rely on performance monitor to show exactly when messages leave one machine and arrive at the other.

Most delays I have seen are:

  • delays within the sending application
  • DNS/name resolution issues (but this should just delay the first message as after that the connection is up and running).

Have a look at the outgoing queue when you send a message to see if the connection is pending.

Is the delay consistent?

Cheers
John Breawkell

share|improve this answer
up vote 1 down vote accepted

Our problem turned out to be an infrastructure issue with servers not properly authenticating. Our sysadmin finally got it straightened out by reconfiguring the server hosting the queue.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.