[rabbitmq-discuss] Questions about running .NET binaries SendString.exe, SingleGet.exe, rabbitmqclt.bat

Tim Watson tim at rabbitmq.com
Tue Sep 10 22:11:55 BST 2013


Please start new topics when you have new issues.

Have you searched the mailing list archive? This question has been answered dozens of times. Once you've eliminated the usual things, if it's still not working then feel free to post back for help.

T

On 10 Sep 2013, at 16:15, Li, Mike wrote:

> Thanks Tim for the guidance on sendstring and singleget.
>  
> Next question is:
>  
> C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.1.5\sbin>rabbitmqctl list_queues
> Listing queues ...
> Error: unable to connect to node rabbitmqctl1765387 at 2UA0480ZK0: nodedown
>  
> DIAGNOSTICS
> ===========
>  
> nodes in question: [rabbitmqctl1765387 at 2UA0480ZK0]
>  
> hosts, their running nodes and ports:
> - 2UA0480ZK0: [{rabbit,65201},{rabbitmqctl572059,56762}]
>  
> current node details:
> - node name: rabbitmqctl572059 at 2UA0480ZK0
> - home dir: F:\
> - cookie hash: WS55vwJzesUiy9buyfOeTw==
>  
> Please advise.
>  
> From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Tim Watson
> Sent: Tuesday, September 10, 2013 4:54 AM
> To: Discussions about RabbitMQ
> Subject: Re: [rabbitmq-discuss] Questions about running .NET binaries SendString.exe, SingleGet.exe, rabbitmqclt.bat
>  
> Hi,
>  
> On 9 Sep 2013, at 19:29, Li, Mike wrote:
> I was able to complete http://www.rabbitmq.com/tutorials/tutorial-one-python.html to tutorial-three-phython.html
>  
> When I tried using SendString and SingleGet .NET binaries, and rabbitmqctl.bat I net getting much luck.
>  
> Have you tried writing code similar to the python tutorial using the .NET client? Looking at https://github.com/rabbitmq/rabbitmq-tutorials/tree/master/dotnet might help, though that's probably very out of date.
>  
> But no message in the hello queue found.
>  
> Well indeed - queues are not magically created for you, you've got to declare them either in your code or using one of the various management tools.
> 
> 
>  
> Manually added message via Queue > hello > Publish message (and added messages using steps in tutorial-one-python.html)
>  
>  
> That's one way to do it.
> 
> 
> Tried getting the message failed also:
> c:\RabbitMQ.NetClient\bin>singleget "amqp://guest:guest@127.0.0.1:5672/" hello
>  
>  
> The reason for the the failure is tucked away in the exception message here:
> 
> 
> text="PRECONDITION_FAILED - parameters for queue 'hello' in vhost '/' not equivalent"
>  
> Before singleget attempts to issue a basic.get, it declares the target queue - using queue.declare - to ensure it's present. This is fine, since queue.declare is idempotent - if the queue already exists, the declaration acts like an assertion, otherwise it creates the queue. As you can see below, the code in SingleGet that declares the queue makes very specific assumptions about parameters:
>  
>             using (IModel ch = conn.CreateModel()) {
>                 conn.AutoClose = true;
>  
>                 ch.QueueDeclare(queueName, false, false, false, null);
>                 BasicGetResult result = ch.BasicGet(queueName, false);
>                 if (result == null) {
>                     Console.WriteLine("No message available.");
>                 } else {
>                     ch.BasicAck(result.DeliveryTag, false);
>                     Console.WriteLine("Message:");
>                     DebugUtil.DumpProperties(result, Console.Out, 0);
>                 }
>  
>                 return 0;
>             }
>  
> So at the time that queue.declare method is issued to the server, if the queue that you manually created on the server was configured with *different* parameters, the queue.declare method will fail and a channel error will be raised, invalidating the channel and throwing an exception in the client.
> 
> 
>  
> Please advise.
>  
> Make sure that the queue you're consuming via SingleGet was declared with exactly these same parameters. Alternatively, write you own code to consume messages from the queue, and ensure that when calling the channel's QueueDeclare method, you provide the same parameters that the queue was originally declared/created with.
>  
> Cheers,
> Tim
>  
> Confidentiality Notice:  This email, including attachments, may include non-public, proprietary, confidential or legally privileged information.  If you are not an intended recipient or an authorized agent of an intended recipient, you are hereby notified that any dissemination, distribution or copying of the information contained in or transmitted with this e-mail is unauthorized and strictly prohibited.  If you have received this email in error, please notify the sender by replying to this message and permanently delete this e-mail, its attachments, and any copies of it immediately.  You should not retain, copy or use this e-mail or any attachment for any purpose, nor disclose all or any part of the contents to any other person. Thank you
> 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130910/e3a9a93d/attachment.htm>


More information about the rabbitmq-discuss mailing list