Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 96FFD10279 for ; Wed, 22 Jan 2014 11:04:57 +0000 (UTC) Received: (qmail 72815 invoked by uid 500); 22 Jan 2014 11:04:57 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 72462 invoked by uid 500); 22 Jan 2014 11:04:56 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 72454 invoked by uid 99); 22 Jan 2014 11:04:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jan 2014 11:04:55 +0000 X-ASF-Spam-Status: No, hits=-3.7 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gsim@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jan 2014 11:04:51 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0MB4Tjc022810 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 22 Jan 2014 06:04:29 -0500 Received: from [10.36.116.84] (ovpn-116-84.ams2.redhat.com [10.36.116.84]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s0MB4SRU013283 for ; Wed, 22 Jan 2014 06:04:28 -0500 Message-ID: <52DFA63B.9040600@redhat.com> Date: Wed, 22 Jan 2014 11:06:35 +0000 From: Gordon Sim Organization: Red Hat UK Ltd, Registered in England and Wales under Company Registration No. 3798903, Directors: Michael Cunningham (USA), Matt Parsons (USA), Charlie Peters (USA), Paul Hickey (Ireland) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: Connecting to RabbitMQ using Qpid Messaging API and .NET using AMQP 1.0 References: <1390388128967-7603069.post@n2.nabble.com> In-Reply-To: <1390388128967-7603069.post@n2.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Virus-Checked: Checked by ClamAV on apache.org On 01/22/2014 10:55 AM, m4tthall wrote: > Hi, > > So I am pretty new to all this but this is what I have done so far: > > * Installed the AMQP 1.0 plugin on RabbitMQ > * Got someone else to build me org.apache.qpid.messaging.dll > * Created a test client in .NET that attempts to send a message to RabbitMQ > using the org.apache.qpid.messaging reference > > The results are: > > * App hangs (as in sits there doing nothing) on connection.Open() > * RabbitMQ log shows the following corresponding entries > > accepting AMQP connection <0.1096.0> ([::1]:62242 -> [::1]:5672) > closing AMQP connection <0.1096.0> ([::1]:62242 -> [::1]:5672): > {bad_version,{1,1,0,10}} > > I have spent a fair bit of time trying to investigate this and the only > thing I can find is that bad_version might be due to using AMQP 0-10 rather > than AMQP 1.0 as RabbitMQ only supports 0-9-1 or 1.0 via the plugin. > > So, I have a couple of questions: > > * Have I setup something incorrectly? > * Do I need to specify something on the Qpid client to force it to use AMQP > 1.0? Yes, at present you need to set the 'protocol' connection option to 'amqp1.0'. Having the client try all supported protocols when this option is not specified (until the broker accepts one), would be a nice addition I guess, I just haven't got round to doing it. > Here is a snippet of the code in case that provides any clues > > String host = "localhost:5672"; > String addr = "amq.direct/key"; You will also need to change this address a little when running against RabbitMQ as it doesn't support the 'legacy bindings' filters. String addr = "'/exchanges/amq.direct/key'"; should do what you want however. > Int32 nMsg = 10; > > Console.WriteLine("csharp.direct.sender"); > Console.WriteLine("host : {0}", host); > Console.WriteLine("addr : {0}", addr); > Console.WriteLine("nMsg : {0}", nMsg); > Console.WriteLine(); > > Connection connection = null; > try > { > connection = new Connection(host); > connection.Open(); <--- FAILS HERE, NO EXCEPTION BEING CAUGHT > if (!connection.IsOpen) { > Console.WriteLine("Failed to open connection to host : {0}", host); > } else { > Session session = connection.CreateSession(); > Sender sender = session.CreateSender(addr); > for (int i = 0; i < nMsg; i++) { > Message message = new Message(String.Format("Test Message {0}", > i)); > sender.Send(message); > } > session.Sync(); > connection.Close(); > return; > } > } catch (Exception e) { > Console.WriteLine("Exception {0}.", e); > if (null != connection) > connection.Close(); > } > > Thanks in advance for any help > > > > -- > View this message in context: http://qpid.2158936.n2.nabble.com/Connecting-to-RabbitMQ-using-Qpid-Messaging-API-and-NET-using-AMQP-1-0-tp7603069.html > Sent from the Apache Qpid users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org > For additional commands, e-mail: users-help@qpid.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org