Ah, well that would explain it. Thanks!

----- Original Message -----
From: "Fraser Adams" <fraser.ad...@blueyonder.co.uk>
To: proton@qpid.apache.org
Sent: Wednesday, August 27, 2014 5:53:55 PM
Subject: Re: javascript bindings connecting to a qpid c++ broker

Hey Ernie,
You did read what I put in my previous response about the JavaScript 
bindings using a *WebSocket* transport didn't you?

send.js and recv.js won't talk *directly* to the C++ broker, however 
I've included a simple WebSocket->TCP Socket proxy.

If you stand up proxy.js that should proxy WS port 5673 to TCP port 5672 
(you can change the defaults using command line parameters do node 
proxy.js -h to see)

Something like

Proxying ws -> tcp
Forwarding port 5673 to

./recv.js amqp://localhost:5673/eaq

./send.js -a amqp://localhost:5673/eaq

JavaScript is a bit funny like that :-) I mentioned on my TODO list that 
I want to look at native TCP sockets for node, but the main reason for 
doing JavaScript is really to get AMQP working in a browser and for that 
WebSockets are pretty much the only reasonable transport - though Chrome 
packaged apps allow TCP connections.

The Java Broker has a WebSocket transport so I can talk directly to 
that, though that has its own quirks at the moment.

Almost certainly the fact that it's a WebSocket transport is the cause 
of what you are seeing.


On 27/08/14 20:34, Ernest Allen wrote:
> I'm getting a connection error when using the javascript bindings example 
> recv.js to receive a message through a qpid c++ broker.
> I have a qpid c++ broker running on a remote host with a queue named "eaq". 
> I'm attempting to start up the javascript example recv.js using the remote 
> address/queue, but I'm getting a connection error:
> [eallen@redhat javascript]$ node recv.js amqp://my.remote.host.com/eaq
> that._checkErrors = true
> error = 3,111,ECONNREFUSED: Connection refused
> { [MessengerError: ECONNREFUSED: Connection refused]
>    name: 'MessengerError',
>    message: 'ECONNREFUSED: Connection refused' }
> I've tried variations on the address string (without the amqp://, with the ip 
> address, with a ~) but to no avail.
> Notes:
> - The proton c examples recv and send work just fine with my broker running 
> on the remote host and queue. I also tried the python and ruby bindings and 
> they worked.
> - Also, the javascript bindings programs recv.js and send.js work fine 
> together when going through amqp://
> - When I start recv.js (using the default amqp://, and send a message 
> using either the c "send" example or one of the other language bindings 
> "send" example programs, I get an error:
> [eallen@redhat py]$ ./send.py "Hello"
> [0xb1d650]:ERROR[-2] SASL header mismatch: ''
> CONNECTION ERROR connection aborted (remote)
> - I'm also getting the same connection refused error when running the 
> qpid-config.js example against a broker.
> Could this be a problem with my build or environment? Or is this a bug?
> Thanks,
> -Ernie

Reply via email to