I’ve spent some time recently looking at AMQP. I’ve been using it with RabbitMQ and Node. The de facto library for Node is node-amqp, which is powerful, but I have found it to be too low-level for my every day needs of pub/sub.

I wanted a more succinct syntax for publish and subscribe so I created node-messaging.

Below are some code snippets, for complete examples and further documentation jump over to node-messaging.


messaging.createMessenger( url, function( messenger ) {
    messenger.openForPublish( exchangeName, exchangeOptions, function() {
        messenger.publish( exchangeName, routingKey, { body: "hello world" }, messageOptions );


messaging.createMessenger( url, function( messenger ) {
    messenger.openAndSubscribe( exchangeName, exchangeOptions, queueName, queueOptions, bindingKey, subscribeOptions, function( message ) {
        console.log( "Received message '%s'", message.body );

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s