API to send AMQP messages with persistence transparently
Last updated a year ago by wolfylpdc .
MIT · Bugs · Original npm · Tarball · package.json
$ cnpm install amqp-sender 
SYNC missed versions from official npm registry.

AMQPSender 1.2.0 library for Node.js

AMQPSender is a library that allows developers to send AMQP messages with persistence transparently

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system


AMQPSender requires the packages:

  • amqplib - To interact with the AMQP Server
  • lowdb - To store the messages locally
  • shortid - To identify the stored messages


  • winston - To add a log to AMQPSender. By default there is no log


If you already have Node.js and npm on your system you can install the library simply by downloading the distribution, unpack it and install in the usual fashion:

npm install amqp-sender


The recommended way to use amqp-sender is to create your own sender. You can send messages and you should try to send pending messages periodically

const AMQPSender = require('amqp-sender');
const sender = new AMQPSender('foo', 'bar', '*', './output_queue.json');

    "from": "mike",
    "to": "jessie",
    "content": "How are you?",
    "date": 1535214220074
    .then((message) => {
        // Message sent correctly
    .catch((reason) => {
        // Fail sending the message

Running the tests

If you want to execute tests to try AMQPSender you have the folder ./tests/ which includes four tests:

IMPORTANT!! To test using_logger.js you have to install Winston which is not a dependence by default


  • Marc SolĂ© Fonte - Initial work - WolfyLPDC


This project is licensed under the MIT License - see the file for details


  • Thanks to the authors and contributors of amqplib, lowdb and shortid
  • Thanks to all the people that have helped or supported me during this development


  • 1.0.0 - 24/08/2018 - Initial release.
  • 1.1.0 - 27/08/2018 - Now, methods of the API send_message() and send_pending_messages() implement a Promise
  • 1.2.0 - 27/08/2018 - Now, sent messages are not stringified
  • 1.2.1 - 02/09/2018 - Solves a bug with concurrency

Current Tags

  • 1.2.1                                ...           latest (a year ago)

1 Versions

  • 1.2.1                                ...           a year ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (3)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2016 © |