Harry
Harry

Reputation: 54949

Passing messages between servers with nodejs

I'm researching ways to pass messages between node.js server.

I was thinking about using hook.io. But hook.io is now dead. What are some alternatives to hook.io? Preferably the alternatives would be in node userland to keep things simple.

Thanks

Upvotes: 1

Views: 1380

Answers (1)

Golo Roden
Golo Roden

Reputation: 150624

Basically I think a message queue might be a good idea. Which message queue you are going to use depends on your requirements - fault tolerence, transaction support, ...

Interesting to know is that there is a standard for message queues: AMQP - the Advanced Message Queueing Protocol. If you are going with a message queue that supports AMQP you can easily switch implementations without adjusting your code.

A module you probably want to check out is node-amqp which allows you to connect to any AMQP-based message queue.

I run RabbitMQ with it and I'm confident so far. In case you are hosting your Node.js application on Heroku: CloudAMQP offers hosted RabbitMQ services that integrate with Heroku.

If you prefer a solution written completely in Node.js, check out Kue by TJ Holowaychuk - it's a great message queue backed by Redis.

Upvotes: 2

Related Questions