MSMQ
-
Hi all, i have written a small program in which i want to check whether a Queue exists and for this i used the Exists method of the MessageQueue but i throws an Exception saying that " Cannot determine whether a queue with the specified format name exists" Anyone knows wht is the right way to check that Thanks Pramod
-
Hi all, i have written a small program in which i want to check whether a Queue exists and for this i used the Exists method of the MessageQueue but i throws an Exception saying that " Cannot determine whether a queue with the specified format name exists" Anyone knows wht is the right way to check that Thanks Pramod
Can you specify the path of the queue you are using and whether this queue is on the same server as your application. Akif
-
Can you specify the path of the queue you are using and whether this queue is on the same server as your application. Akif
-
the application is not on the server i more thing is that i am not able to create a queue on the server by executing the application from my machine Thanks Pramod
If you are using a private queue then the format of the path for the queue will be: "FormatName:DIRECT=OS:machinename\private$\queuename" and if you are using a public queue, then the format of the path will be: "ServerName\QueueName" but remember one thing, you cannot use a private queue in ActiveDirectory environment. It can only be used in workgroup environment. Hope it will help you. Akif
-
If you are using a private queue then the format of the path for the queue will be: "FormatName:DIRECT=OS:machinename\private$\queuename" and if you are using a public queue, then the format of the path will be: "ServerName\QueueName" but remember one thing, you cannot use a private queue in ActiveDirectory environment. It can only be used in workgroup environment. Hope it will help you. Akif
The server which i am using is a XP professional machine and it does not shows Public Queue, I wanted to know whether i can create a private queue from my code on that machine, I created a queue manually by going to the computer management window, but i want to check whether a specified queue exists or not if not then it should be created Is there a way to do that. Thanks Pramod
-
The server which i am using is a XP professional machine and it does not shows Public Queue, I wanted to know whether i can create a private queue from my code on that machine, I created a queue manually by going to the computer management window, but i want to check whether a specified queue exists or not if not then it should be created Is there a way to do that. Thanks Pramod
If it is a private queue then you can check whether it exists or not. You just need to use: "FormatName:DIRECT=OS:machinename\private$\queuename" as its path and then check IsExists property. Akif
-
If it is a private queue then you can check whether it exists or not. You just need to use: "FormatName:DIRECT=OS:machinename\private$\queuename" as its path and then check IsExists property. Akif
-
Use MessageQueue.Exists(QueueName) to check whether the queue exists or not. Sorry;) it is not a property infact a static method. There is a good article on the usuage of MSMQ. Check it out[^] Akif
-
Use MessageQueue.Exists(QueueName) to check whether the queue exists or not. Sorry;) it is not a property infact a static method. There is a good article on the usuage of MSMQ. Check it out[^] Akif
-
i have already tried that but that throws an Exception saying "Invalid Queue PAth name" i am not able to check the existence of the Queue on the server i am able to send and Receive msgs Thanks Pramod
"Exists cannot be called to verify the existence of a remote private queue" Syntex of the QueueNamePath is: Public queue: MachineName\QueueName Private queue: MachineName\Private$\QueueName Journal queue: MachineName\QueueName\Journal$ Machine journal queue: MachineName\Journal$ Machine dead-letter queue: MachineName\Deadletter$ Machine transactional dead-letter queue: MachineName\XactDeadletter$ Akif
-
"Exists cannot be called to verify the existence of a remote private queue" Syntex of the QueueNamePath is: Public queue: MachineName\QueueName Private queue: MachineName\Private$\QueueName Journal queue: MachineName\QueueName\Journal$ Machine journal queue: MachineName\Journal$ Machine dead-letter queue: MachineName\Deadletter$ Machine transactional dead-letter queue: MachineName\XactDeadletter$ Akif
-
then how should one check whether a Queue exists or not we cannot directly send or receive msgs whether checking the existence of the queue Thanks, Pramod
You can go for public queues. In that case, you ll be able to check its existance. If you want to use private queues, the dirty way of finding whether the queue exists is to create the queue with the path specified and then catching the exception. If the path is wrong, then its object will not be created and an exception will be raised. Hope it will help you :) Akif
-
You can go for public queues. In that case, you ll be able to check its existance. If you want to use private queues, the dirty way of finding whether the queue exists is to create the queue with the path specified and then catching the exception. If the path is wrong, then its object will not be created and an exception will be raised. Hope it will help you :) Akif
Ugly but true the biggest problem is the that you have to use a different "SYNTAX" when accessing the queue depending if you are reading / creating.... Basically to create the queue you have to use PATH NAME, tipically when you are reading you are using Format Name
instance.msmq = new MessageQueue ( @"FormatName:DIRECT=OS:vircs-d2gs01\private$\InstrumentationQueue" ); MessageQueue.Create ( @".\private$\InstrumentationQueue" );
Good link about Queues names http://blogs.msdn.com/johnbreakwell/archive/2009/02/26/difference-between-path-name-and-format-name-when-accessing-msmq-queues.aspx[^]Ricardo Casquete
-
Hi all, i have written a small program in which i want to check whether a Queue exists and for this i used the Exists method of the MessageQueue but i throws an Exception saying that " Cannot determine whether a queue with the specified format name exists" Anyone knows wht is the right way to check that Thanks Pramod
the biggest problem is the that you have to use a different "SYNTAX" when accessing the queue depending if you are reading / creating.... Basically to create the queue you have to use PATH NAME, tipically when you are reading you are using Format Name
instance.msmq = new MessageQueue ( @"FormatName:DIRECT=OS:vircs-d2gs01\private$\InstrumentationQueue" ); MessageQueue.Create ( @".\private$\InstrumentationQueue" );
Good link about Queues names http://blogs.msdn.com/johnbreakwell/archive/2009/02/26/difference-between-path-name-and-format-name-when-accessing-msmq-queues.aspx[^]Ricardo Casquete