[rabbitmq-discuss] getting node.js to talk to scala over rabbitmq
Simon MacMullen
simon at rabbitmq.com
Tue Oct 25 10:47:27 BST 2011
On 25/10/11 00:50, Meredith Gregory wrote:
> Dear Rabbiters,
>
> i'm running into a problem getting node.js to talk to scala over
> rabbitmq. i'm using the node-amqp package with node.js. i installed it
> using npm install amqp. i'm using the java client for rabbitmq 2.5.1 on
> the scala side. i've successfully gotten scala to talk to scala
> and node.js to talk to node.js. However, when i attempt to get node.js
> to talk to scala there appears to be a disagreement regarding
> queue declaration. Thus, if i fire up node.js first and look at the
> queue it creates with the rabbitmq management plugin i see
>
>
>
> node-simple-direct_queue
> <http://localhost:55672/mgmt/#/queues/%2F/node-simple-direct_queue>
> AD Idle 0 0 0
So this looks like a transient autodelete queue.
> i then attempt to accomplish a connection from the scala side (with code
> that works on scala-to-scala) and i see an exception when the code calls
> the queueDeclare method.
>
> channel.exchangeDeclare( exQNameRoot, "direct" )
> //channel.queueDeclare(qname, true, false, false, null);
> channel.queueDeclare(qname, true, false, true, null); // <-- here we
> throw an exception
And here you are declaring a durable autodelete queue. That's probably
your problem.
> java.io.IOException
> at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:107)
> at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:131)
> at com.rabbitmq.client.impl.ChannelN.queueDeclare(ChannelN.java:627)
> at com.rabbitmq.client.impl.ChannelN.queueDeclare(ChannelN.java:59)
> at
> com.biosimilarity.lift.lib.AMQPBrokerScope$StdMonadicAMQPSndrRcvr.sender(AMQPMnd.scala:53)
...but you can unwrap this exception and check, or look in the broker
logs to see what it's complaining about.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, VMware
More information about the rabbitmq-discuss
mailing list