activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: AMQP and Node.js
Date Fri, 12 Jul 2013 16:00:40 GMT
On 07/12/2013 02:45 AM, razeone wrote:
> Well, I have this Node.js application that uses STOMP to connect to ActiveMQ.
> Everithing was cool until I needed better performance, and que STOMP
> implementations in Node.js are more like personal projects.
>
> So, looking for the ActiveMQ documentation, I realized that it supports now
> AMQP and I decided to change to this protocol.
>
> The issue is that I cannot connect to the broker, I have setted up and
> configure it but I don't get the connection.
>
> I'm trying with and without the credentials, the explicit port, the url, and
> it just not works, there's somebody already did this?
>
> With the same client I'm always get connected to RabbitMQ, and that's a good
> start, I think. This is my actual code:
>
> var amqp = require('amqp');
>
> var conn = amqp.createConnection({host: "10.193.2.29:5672"},
>                          {defaultExchangeName: "my-queue"});
>
> // Wait for connection to become established.
> conn.on('ready', function () {
>       console.log('Im now connected');
>       // Use the default 'amq.topic' exchange
>       var q = conn.queue('my-queue', function (queue) {
>             console.log('Queue ' + queue.name + ' is open');
>      });
> });

Unfortunately that is a protocol version issue. ActiveMQ supports AMQP 
1.0. Priori to this being released AMQP had a couple of earlier releases 
that were in effect entirely different protocols. The implementation you 
are using here implements the 0-8/0-9-1 version of AMQP so won't work 
against a 1.0 implementation.


Mime
View raw message