On 10 December 2014 at 23:42:23, Andrew Collins (
andymc...@gmail.com) wrote:
> Which one should be used?
amqp.node. Avoid node-amqp as it has known bugs and is not really maintained.
> I have successfully used the rabbitMQ tutorials for both amp
> and amqplib, but the amp didn't work as expected with the rabbit
> management screen, in that no messages ever appeared on the queued
> messages graph, even if the subscriber wasn't running.
This means they were never routed. It doesn't matter if you have consumers online or not,
if messages are routed, it will be seen on the charts [of target queues].
>
> The syntax for amqplib seems more complicated with the returns
> etc, whereas the amqp used the .on events.
amqp.node has a callback API as well as futures (promises):
https://github.com/squaremo/amqp.node#callback-api-example
https://github.com/squaremo/amqp.node#promise-api-example
> Should i worry about posting to an exchange or just the queue?
See
http://www.rabbitmq.com/tutorials/amqp-concepts.html. You never publish to queues,
the sendToQueue function which I believe amqp.node has uses default exchange. There is nothing
wrong with using that function but eventually you'll have to get familiar with other exchanges [exchange types].
--
MK
Staff Software Engineer, Pivotal/RabbitMQ