[rabbitmq-discuss] getting node.js to talk to scala over rabbitmq

Meredith Gregory lgreg.meredith at gmail.com
Thu Oct 27 21:46:27 BST 2011


Dear Rabbiters,

A follow on query. It appears that with the node.js node-amqp client i need
only set the content type to have the content encoding handled more or less
appropriately. In the java client the default seems to be octet stream. Is
there an encoding service underneath basicPublish / basicConsume that is
utilizing the info on the content type properties or is that a feature of a
given client offering (such as node-amqp)?

Best wishes,

--greg

On Tue, Oct 25, 2011 at 9:45 AM, Meredith Gregory
<lgreg.meredith at gmail.com>wrote:

> Dear Simon, et al,
>
> Thanks! Yes, i spotted it almost immediately after i sent the email. ;-)
> The two are happily chatting, now.
>
> Best wishes,
>
> --greg
>
>
> On Tue, Oct 25, 2011 at 2:47 AM, Simon MacMullen <simon at rabbitmq.com>wrote:
>
>> 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<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
>> ______________________________**_________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.**rabbitmq.com<rabbitmq-discuss at lists.rabbitmq.com>
>> https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss<https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>
>>
>
>
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 7329 39th Ave SW
> Seattle, WA 98136
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SW
Seattle, WA 98136

+1 206.650.3740

http://biosimilarity.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111027/3e729b8c/attachment.htm>


More information about the rabbitmq-discuss mailing list