A few companies pack huge amounts of useful information into their queue names so that it is very easy to work out what each queue is for. A downside of this is that some Windows applications inconsistently display the queue names.
Take the following sample public and private queues I created for test, each 70 characters in length:
Performance Monitor can only display 64 characters for the MSMQ queue object which includes the computer name (and "\private$" for private queues) as documented here:
As you can see below, the 70-character private queue becomes 41 characters long after "servername\private$\" is taken into account:
The observant amongst you will notice that this only accounts for 63 characters - there is always an invisible NULL character in the 64th position.
Now on the other hand, the Server Explorer in Visual Studio can display long private queues but has trouble with public queues:
The reason for this is that the queue name is handled differently. Unlike Performance Monitor, there is no fixed 64-byte limit in the application. Instead the limit is in how queue names are stored in Active Directory.
If we look at the configuration file (found in the system32\msmq\storage\lqs subdirectory) for the private queue:
all the characters are stored in one place.
For public queues, though, only the first 64 characters will fit in the field used to store the name in Active Directory and the remainder of the name gets stored in another field (mSMQQueueNameExt).
Depending on the operation, MSMQ performs :
There is a more important "Gotcha" although you are VERY unlikely to see it. It goes like this:
Personally I can't see any real-world scenarios where somebody would get this problem but I thought I would add it for completeness.
Best practice - stick to 63 characters for public or private queues and you won't go wrong.