Skip to content

lcnvdl/falso-amqp

Repository files navigation

falso-amqp

Falso AMQP - Node.js amqp-like server & client library

NPM Version Build Status codecov Known Vulnerabilities

Falso AMQP is a AMQP-like server for Node.js. It client library is designed to be used exactly like amqplib with rabbitmq.

Support us

  • patreon or
  • ko-fi

History

I was working with microservices in Node JS. The MS nodes were connected using RabbitMQ. My life was happy, until I've tried to deploy my project to azure. That was when I realize that the thing is was not so easy.

In order to use AMQP on Azure, I had two options:

  1. Set up a virtual machine, and a Rabbit MQ server inside.
  2. Use the AMQP service, provided by azure (you really have to control your messages exchange, otherwise it will be very expensive).

I just wanted a simpler think: deploy my microservices into an "app service" resource. Just that!

So, I decided to implement a AMQP-Like NodeJS Server and Client (library).

Getting started

You have two ways to implement the server.

Server (outside your project)

  1. Install falso-amqp globally
npm i falso-amqp -g
  1. Run it falso-amqp

Server (inside your project)

  1. Install falso-amqp
npm i falso-amqp --save
  1. Require
const runServer = require("falso-amqp");
 
runServer();

Client Library

npm i falso-amqp-client --save

Falso AMQP Client

The objetive of the Client library is to be compatible with Rabbit MQ.

Compatibility

Features based on amqplib channel api

Function Status
connect OK
ChannelModel and CallbackModel
connection.close OK
events
connection.createChannel OK
connection.createConfirmChannel
Channel
channel.close
events
channel.assertQueue OK
channel.checkQueue
channel.deleteQueue
channel.purgeQueue
channel.bindQueue OK
channel.unbindQueue
channel.assertExchange OK
channel.checkExchange
channel.deleteExchange
channel.bindExchange
channel.unbindExchange
channel.publish OK
channel.sendToQueue OK
channel.consume OK
channel.cancel
channel.get
channel.ack In progress
channel.ackAll
channel.nack In progress
channel.nackAll
channel.reject
channel.prefetch In progress
channel.recover
ConfirmChannel
confirmChannel.publish
confirmChannel.sendToQueue
confirmChannel.waitForConfirms

Releases

No releases published

Packages

No packages published