{"name":"amqplib","homepage":"http://squaremo.github.io/amqp.node/","main":"./channel_api.js","version":"0.5.5","description":"An AMQP 0-9-1 (e.g., RabbitMQ) library and client.","repository":{"type":"git","url":"git+https://github.com/squaremo/amqp.node.git"},"engines":{"node":">=0.8 <=12"},"dependencies":{"bitsyntax":"~0.1.0","bluebird":"^3.5.2","buffer-more-ints":"~1.0.0","readable-stream":"1.x >=1.1.9","safe-buffer":"~5.1.2","url-parse":"~1.4.3"},"devDependencies":{"claire":"0.4.1","istanbul":"0.1.x","mocha":"^3.5.3","uglify-js":"2.6.x"},"scripts":{"test":"make test","prepare":"make"},"keywords":["AMQP","AMQP 0-9-1","RabbitMQ"],"author":{"name":"Michael Bridgen","email":"mikeb@squaremobius.net"},"license":"MIT","gitHead":"df4f807c9dd5276b7d280f8b988e5117996becd2","bugs":{"url":"https://github.com/squaremo/amqp.node/issues"},"_id":"amqplib@0.5.5","_shasum":"698f0cb577e0591954a90572fcb3b8998a76fd40","_from":".","_npmVersion":"2.15.12","_nodeVersion":"11.1.0","_npmUser":{"name":"squaremo","email":"mikeb@squaremobius.net"},"dist":{"shasum":"698f0cb577e0591954a90572fcb3b8998a76fd40","tarball":"http://registry-npm.ywwl.com/amqplib/download/amqplib-0.5.5.tgz","integrity":"sha512-sWx1hbfHbyKMw6bXOK2k6+lHL8TESWxjAx5hG8fBtT7wcxoXNIsFxZMnFyBjxt3yL14vn7WqBDe5U6BGOadtLg==","fileCount":68,"unpackedSize":419882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdP/jNCRA9TVsSAnZWagAApxwP/0KYLAtgmM2LtYA7q5Sk\nQW54gy4BoZRNfe2ZFdpba9rSIQYPyo5wLg9DFURu/S108lVnh6v1b1DhT8qF\nA7J6SALc9rIfvUMHIAkawuTwlUXlfEbsdOjj7ts3eHthc8nS4hiUbRG7yAeS\nqb3VtAV4za5hh/uzhEi/Blxu7RNLOSuUQh1imvlrC0IZTbsD2VMnEmwaK3LA\nClMz0wtkdCWpybo7E6hDEQ4ga7Le3gBUyO51K0A0Yb42uqBhkdmoiUdLTo9G\nDxodCgfyIDm4UVf7JtvmgE2nJZ1fUCjydzHeGw+EK4cdasCphdZPMC+WpKag\n6IyzJQ1iA8eUjRd3FWhySj9zemECx9WigsBDuUwEyaQP3vk4/8cT6ugeoctB\npUOd+8G3NaN7/hdTqxoEf/5PaFzdvQpGKJhhJu0sTJlgRRf4ZElRHobP3nUU\nqi8VII3R9fy7cnVv6LpLtj+x2/d4MROUcuzryoqTh2Rg2dMj/1oS6ta9EWvw\n/sOEp6Zh6wndxVniggdNvz4J+th9JmoXxPq0UE7cn6SfhUpXHcHvms11Bdyq\nbUQRRBve3GmQiTKBkK22YIpTcx5wT949EvkbMeQFjjGV8cmIXCKV3HFnDZrH\nluCbe3Tk/UKmNEUfgqk4tQJ8Y4HQSILx5avPMNp2gK1KMsu53aYGsuA0RjIF\np4La\r\n=FZqF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBsPf/IrbBiXSJxpsv24Ps0J2ESlL3XdjuXNGZDAG3eQAiEAr01JaAIaBs/5ne1fJG0SuD2SzBzG96mppoOijpTkJ78="}],"size":84162,"noattachment":false,"key":"/amqplib/-/amqplib-0.5.5.tgz"},"maintainers":[{"name":"squaremo","email":"mikeb@squaremobius.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amqplib_0.5.5_1564473549268_0.26824015975247884"},"_hasShrinkwrap":false,"readme":"# AMQP 0-9-1 library and client for Node.JS\n\n[![NPM version](https://img.shields.io/npm/v/amqplib.svg?style=flat-square)](https://www.npmjs.com/package/amqplib)\n[![NPM downloads](https://img.shields.io/npm/dm/amqplib.svg?style=flat-square)](https://www.npmjs.com/package/amqplib)\n[![Node.js CI](https://github.com/amqp-node/amqplib/workflows/Node.js%20CI/badge.svg)](https://github.com/amqp-node/amqplib/actions?query=workflow%3A%22Node.js+CI%22)\n[![amqplib](https://snyk.io/advisor/npm-package/amqplib/badge.svg)](https://snyk.io/advisor/npm-package/amqplib)\n\n    npm install amqplib\n\n * [Change log][changelog]\n * [GitHub pages][gh-pages]\n * [API reference][gh-pages-apiref]\n * [Troubleshooting][gh-pages-trouble]\n * [Examples from RabbitMQ tutorials][tutes]\n\n\nA library for making AMQP 0-9-1 clients for Node.JS, and an AMQP 0-9-1 client for Node.JS v10+.\n\nThis library does not implement [AMQP\n1.0](https://github.com/squaremo/amqp.node/issues/63) or [AMQP\n0-10](https://github.com/squaremo/amqp.node/issues/94).\n\nProject status:\n\n - Expected to work\n - Complete high-level and low-level APIs (i.e., all bits of the protocol)\n - Stable APIs\n - A fair few tests\n - Measured test coverage\n - Ports of the [RabbitMQ tutorials][rabbitmq-tutes] as [examples][tutes]\n - Used in production\n\nStill working on:\n\n - Getting to 100% (or very close to 100%) test coverage\n\n## Callback API example\n\n```javascript\nconst amqplib = require('amqplib/callback_api');\nconst queue = 'tasks';\n\namqplib.connect('amqp://localhost', (err, conn) => {\n  if (err) throw err;\n\n  // Listener\n  conn.createChannel((err, ch2) => {\n    if (err) throw err;\n\n    ch2.assertQueue(queue);\n\n    ch2.consume(queue, (msg) => {\n      if (msg !== null) {\n        console.log(msg.content.toString());\n        ch2.ack(msg);\n      } else {\n        console.log('Consumer cancelled by server');\n      }\n    });\n  });\n\n  // Sender\n  conn.createChannel((err, ch1) => {\n    if (err) throw err;\n\n    ch1.assertQueue(queue);\n\n    setInterval(() => {\n      ch1.sendToQueue(queue, Buffer.from('something to do'));\n    }, 1000);\n  });\n});\n```\n\n## Promise/Async API example\n\n```javascript\nconst amqplib = require('amqplib');\n\n(async () => {\n  const queue = 'tasks';\n  const conn = await amqplib.connect('amqp://localhost');\n\n  const ch1 = await conn.createChannel();\n  await ch1.assertQueue(queue);\n\n  // Listener\n  ch1.consume(queue, (msg) => {\n    if (msg !== null) {\n      console.log('Received:', msg.content.toString());\n      ch1.ack(msg);\n    } else {\n      console.log('Consumer cancelled by server');\n    }\n  });\n\n  // Sender\n  const ch2 = await conn.createChannel();\n\n  setInterval(() => {\n    ch2.sendToQueue(queue, Buffer.from('something to do'));\n  }, 1000);\n})();\n\n```\n\n## Running tests\n\n    npm test\n\nTo run the tests RabbitMQ is required. Either install it with your package\nmanager, or use [docker][] to run a RabbitMQ instance.\n\n    docker run -d --name amqp.test -p 5672:5672 rabbitmq\n\nIf prefer not to run RabbitMQ locally it is also possible to use a\ninstance of RabbitMQ hosted elsewhere. Use the `URL` environment\nvariable to configure a different amqp host to connect to. You may\nalso need to do this if docker is not on localhost; e.g., if it's\nrunning in docker-machine.\n\nOne public host is dev.rabbitmq.com:\n\n    URL=amqp://dev.rabbitmq.com npm test\n\n**NB** You may experience test failures due to timeouts if using the\ndev.rabbitmq.com instance.\n\nYou can run it under different versions of Node.JS using [nave][]:\n\n    nave use 10 npm test\n\nor run the tests on all supported versions of Node.JS in one go:\n\n    make test-all-nodejs\n\n(which also needs `nave` installed, of course).\n\nLastly, setting the environment variable `LOG_ERRORS` will cause the\ntests to output error messages encountered, to the console; this is\nreally only useful for checking the kind and formatting of the errors.\n\n    LOG_ERRORS=true npm test\n\n## Test coverage\n\n    make coverage\n    open file://`pwd`/coverage/lcov-report/index.html\n\n[gh-pages]: https://amqp-node.github.io/amqplib/\n[gh-pages-apiref]: https://amqp-node.github.io/amqplib/channel_api.html\n[gh-pages-trouble]: https://amqp-node.github.io/amqplib/#troubleshooting\n[nave]: https://github.com/isaacs/nave\n[tutes]: https://github.com/amqp-node/amqplib/tree/main/examples/tutorials\n[rabbitmq-tutes]: http://www.rabbitmq.com/getstarted.html\n[changelog]: https://github.com/amqp-node/amqplib/blob/main/CHANGELOG.md\n[docker]: https://www.docker.com/\n","publish_time":1564473549442,"_cnpm_publish_time":1564473549442,"dist-tags":{"latest":"2.2.1"}}