{"_id":"@naturacosmeticos/iris-nodejs-messenger","_rev":"29-0be66ab22d58a929e2fdbfccc86a7e63","name":"@naturacosmeticos/iris-nodejs-messenger","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.0":{"main":"index.js","name":"@naturacosmeticos/iris-nodejs-messenger","author":{"name":"Natura Cosméticos","email":"TDDAArquitetura@natura.net"},"version":"1.0.0","dependencies":{"@naturacosmeticos/clio-nodejs-logger":"^1.0.0","amqplib":"^0.5.2","async":"^2.6.1","aws-sdk":"^2.271.1","lodash":"^4.17.10","sqs-consumer":"^3.8.0","uuid":"^3.3.2"},"devDependencies":{"chai":"^4.1.2","esdoc":"^1.1.0","esdoc-ecmascript-proposal-plugin":"^1.0.0","esdoc-node":"^1.0.3","esdoc-standard-plugin":"^1.0.0","eslint":"^5.3.0","@naturacosmeticos/eslint-config-natura":"^1.0.0","eslint-plugin-import":"^2.14.0","faker":"^4.1.0","humps":"^2.0.1","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^11.7.3","raw-body":"^2.3.3","sinon":"^5.0.6"},"scripts":{"docs":"esdoc -c .esdoc.json","lint":"eslint src/ test/","lint:fix":"eslint --fix src/ test/","start":"nodemon ./index.js","test":"mocha --recursive -r test/init.js --exit","test:coverage":"nyc mocha --recursive --exit","test:debug":"mocha --recursive --exit --no-timeouts --require architecture-node-base/test-debug","test:unit":"NODE_PATH=src:test mocha test/unit/ --recursive --exit","test:watch":"mocha --recursive -w --exit"},"nyc":{"all":true,"check-coverage":true,"per-file":true,"include":["src/**/*.js"],"exclude":["test/*.js"],"reporter":["lcov","text-summary"],"report-dir":"./coverage"},"contributors":[{"name":"Bruno Cartolari","email":"cartola@vizir.com.br"},{"name":"Daniel Arthaud","email":"daniel@vizir.com.br"},{"name":"Fabrício Campos","email":"fabricio@vizir.com.br"}],"homepage":"https://github.com/natura-cosmeticos/iris-nodejs-messenger#readme","bugs":{"url":"https://github.com/natura-cosmeticos/iris-nodejs-messenger/issues"},"keywords":["messaging","message-queue","message-bus","queue","sns","sqs","rabbitmq"],"license":"MIT","gitHead":"1c46d26f7a062de4dfcb1c963fa2711004fae1ca","description":"This project provides utilities to ease the communication between services.","_id":"@naturacosmeticos/iris-nodejs-messenger@1.0.0","_npmVersion":"6.4.0","_nodeVersion":"10.4.1","_npmUser":{"name":"fabricioffc","email":"ffc.fabricio@gmail.com"},"dist":{"integrity":"sha512-GgwBDp7LsQThk5wlzeePEuvX+PaX0zDgilL5/x1Vz2UQ3+soA52x3YAolbKawFKSR4jxQqQObjaoKnm1PU+/CQ==","shasum":"2156c2876f6d4fb9daaa3902cc5201fe3874a010","tarball":"https://registry.npmjs.org/@naturacosmeticos/iris-nodejs-messenger/-/iris-nodejs-messenger-1.0.0.tgz","fileCount":36,"unpackedSize":40326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb41P1CRA9TVsSAnZWagAAalAP/RtMH+iI8sRVIH14JJfo\nn2ff888QybJiFvLYQIuvxd4OtQEIXMMc2CU1QyJnPF1Km4h/Az/cpfhLjp/a\nJGBx9io3SmJpSrL9u1qH3GGi/SPbEqqKkZrSjSxMfIUDJBnNChdaAm3y3gR/\nC0vP0Ohetf2OXaN5dHhY6miVPc/JLLn3/Ofzym5qx+GVOo8gPMPI35aOFuw3\n2ZQyKtfe7gI2RvRaPoTrlkgo2vUXoeksUqR0sbvW4CsG3GpqF0cGsNGE6V2v\nbyAMa/VISAbdAKOhtEWLhUXignrrxyutNVq5G/KcUNVdWp4hSOgYFJ3KWwTj\nnscFQKUIEDkqsQYZgtPk2Yuo3UsTbcRv0o3eYp6OZeowZW4UbWD0fNQzwAW2\nYkTHoDEldmS7drkQoRTHqwcbegbiZZPdUY5eGupDJZEERhlOT+qJLUbyhEOn\nSCxzDBrfgKYQt4hHQae3mNQO95+2A7hLEsrdBVQ8RBj2FtCsx5gGxPe8A46h\nJfKdoEonNU0qz4VXaNoc8CAVKeEJsgsBLpgVfl7FQLuqu5Eg0AgLD+YWAbkZ\nt4r7F86nASx9D1FVyAFXGyIVTa1Q988DpA/lZn66sf76j+QeiJb3l5zuUMdY\nvODWzoXOxquha9IelujPkf85qj3zqJnFyn69v7qanNvkM+5/vLUTaVRuZIQ2\nx3Wk\r\n=qQvl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDknAp1KQhJRLsnhfrGmvMSl7yjHQh68sYMO+oCkuskbAiEArSVxotSVEjJuWIaSlifRj53wXXuUG2Emmv45aZwINeA="}]},"maintainers":[{"name":"darthaud","email":"arthaud@gmail.com"},{"name":"fabricioffc","email":"ffc.fabricio@gmail.com"},{"name":"handrus","email":"handrus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iris-nodejs-messenger_1.0.0_1541624820938_0.18946287754655966"},"_hasShrinkwrap":false},"2.0.0":{"main":"index.js","name":"@naturacosmeticos/iris-nodejs-messenger","author":{"name":"Natura Cosméticos","email":"TDDAArquitetura@natura.net"},"version":"2.0.0","dependencies":{"@naturacosmeticos/clio-nodejs-logger":"^1.0.0","amqplib":"^0.5.2","async":"^2.6.1","aws-sdk":"^2.271.1","lodash":"^4.17.10","node-gzip":"^1.1.2","sqs-consumer":"^3.8.0","uuid":"^3.3.2"},"devDependencies":{"chai":"^4.1.2","esdoc":"^1.1.0","esdoc-ecmascript-proposal-plugin":"^1.0.0","esdoc-node":"^1.0.3","esdoc-standard-plugin":"^1.0.0","eslint":"^5.3.0","@naturacosmeticos/eslint-config-natura":"^1.0.0","eslint-plugin-import":"^2.14.0","faker":"^4.1.0","humps":"^2.0.1","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^11.7.3","raw-body":"^2.3.3","sinon":"^5.0.6"},"scripts":{"docs":"esdoc -c .esdoc.json","lint":"eslint src/ test/","lint:fix":"eslint --fix src/ test/","start":"nodemon ./index.js","test":"mocha --recursive -r test/init.js --exit","test:coverage":"nyc mocha --recursive --exit","test:debug":"mocha --recursive --exit --no-timeouts --require architecture-node-base/test-debug","test:unit":"NODE_PATH=src:test mocha test/unit/ --recursive --exit","test:watch":"mocha --recursive -w --exit"},"nyc":{"all":true,"check-coverage":true,"per-file":true,"include":["src/**/*.js"],"exclude":["test/*.js"],"reporter":["lcov","text-summary"],"report-dir":"./coverage"},"contributors":[{"name":"Bruno Cartolari","email":"cartola@vizir.com.br"},{"name":"Daniel Arthaud","email":"daniel@vizir.com.br"},{"name":"Fabrício Campos","email":"fabricio@vizir.com.br"},{"name":"Handrus Nogueira","email":"handrus@gmail.com"},{"name":"Danilo Ribeiro","email":"danilo@ventrue.com.br"}],"homepage":"https://github.com/natura-cosmeticos/iris-nodejs-messenger#readme","bugs":{"url":"https://github.com/natura-cosmeticos/iris-nodejs-messenger/issues"},"keywords":["messaging","message-queue","message-bus","queue","sns","sqs","rabbitmq"],"license":"MIT","gitHead":"799d644c0c5c60c21251ff5da5a83bedb6fd7d9d","description":"[![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/iris-nodejs-messenger/badge.svg?targetFile=package.json)](https://snyk.io/test/github/natura-cosmeticos/iris-nodejs-messenger?targetFile=package.json) [![Build Status](https://travis-","_id":"@naturacosmeticos/iris-nodejs-messenger@2.0.0","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-PxePqxRy7tSiFqLybvdryS2WYk2HED69lPzZ0duepwX17MPpBDzyUyJ1Byjb3dRnoK+YcGZ6rSPA7y/M6YlvRw==","shasum":"51875745c41bc7c4f1109c8c1b5930f99873315e","tarball":"https://registry.npmjs.org/@naturacosmeticos/iris-nodejs-messenger/-/iris-nodejs-messenger-2.0.0.tgz","fileCount":47,"unpackedSize":60420,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRPepCRA9TVsSAnZWagAAVhEP/2QOmgLA2scwTiRWHCof\n1oMTs/Cq6iTcWltIMbS59lvFzcXGzjWFVNBew3jQqwtkL7HGlmXWxmdjdtdp\nsTsDpUd5zKPvEEsM1OYMSWVJsWgjnmt1VLTunjqJlelSX96ty0XoZoMaBcMQ\njXgh1sZkuqdFXHqhkryEQb6zFuQcDJeEKxTLeHE1sYuIdtueZ3sLkLRwfQ9N\nO+TZEB+XDGbu44Ig661exViWUv+XoNkxFyZzdnRHpqu0qXkKWQm4GzXRsqoK\n2rw90LWvgCl0pVElkaVoqUfxTaAxU+e11UuIM+hfiYqU6lAUR9R1/aNgkoJW\ngN/Py8zuOBD+FjC/X0x7Y+4IZhg6bduuIrjtwOQC3JtactAP0PgtTJvdxLsd\n2rWHpl1vzYzjQQlCQ6r9e/JWRuUN2hah6yVT/P+MI8tpOlb6ToAqtN6fqicz\nKaRg0yIW2Tg8wdpDNo/KkOc6ELCK3kJD9GZcjmc+rTWM28QtwgafOGzMQbng\n114Lh+9AMH/rq2a9q5TYo+EVXtrZjtelIr5h/xAZqvHncP8259cuSqEKuV8O\n0AAq72rQE0kBfQPq1KRjR8YYtYSUQirfu4/mdilfihHndXBOm4VgI942DLnX\n9VlbxihiHoCXK2b5ZW5YiknBb/CJqovTXb5rJVgkhfBVwmLBWLgcHpxBnYLp\njMuC\r\n=GrHL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjCDRux4TzWUVNLr5SJ8Vd5rCLtu5VKzAboUBg25MRIQIgKIHaFJNUSrAa5oywqNR1nYlMl7RNFA3mDbyZlJnzl5A="}]},"maintainers":[{"name":"darthaud","email":"arthaud@gmail.com"},{"name":"fabricioffc","email":"ffc.fabricio@gmail.com"},{"name":"handrus","email":"handrus@gmail.com"}],"_npmUser":{"name":"handrus","email":"handrus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iris-nodejs-messenger_2.0.0_1564800936933_0.9326679583346638"},"_hasShrinkwrap":false},"2.0.1":{"main":"index.js","name":"@naturacosmeticos/iris-nodejs-messenger","author":{"name":"Natura Cosméticos","email":"TDDAArquitetura@natura.net"},"version":"2.0.1","dependencies":{"@naturacosmeticos/async-hooks-storage":"^1.0.0","@naturacosmeticos/clio-nodejs-logger":"^2.0.0","amqplib":"^0.5.2","async":"^2.6.1","aws-sdk":"^2.505.0","lodash":"^4.17.10","sqs-consumer":"^5.3.0","uuid":"^3.3.2"},"devDependencies":{"chai":"^4.1.2","esdoc":"^1.1.0","esdoc-ecmascript-proposal-plugin":"^1.0.0","esdoc-node":"^1.0.3","esdoc-standard-plugin":"^1.0.0","eslint":"^5.3.0","@naturacosmeticos/eslint-config-natura":"^1.0.0","eslint-plugin-import":"^2.14.0","faker":"^4.1.0","humps":"^2.0.1","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^11.7.3","raw-body":"^2.3.3","sinon":"^5.0.6"},"scripts":{"docs":"esdoc -c .esdoc.json","lint":"eslint src/ test/","lint:fix":"eslint --fix src/ test/","start":"nodemon ./index.js","test":"mocha --recursive -r test/init.js --exit","test:coverage":"nyc mocha --recursive --exit","test:debug":"mocha --recursive --exit --no-timeouts --require architecture-node-base/test-debug","test:unit":"NODE_PATH=src:test mocha test/unit/ --recursive --exit","test:watch":"mocha --recursive -w --exit"},"nyc":{"all":true,"check-coverage":true,"per-file":true,"include":["src/**/*.js"],"exclude":["test/*.js"],"reporter":["lcov","text-summary"],"report-dir":"./coverage"},"contributors":[{"name":"Bruno Cartolari","email":"cartola@vizir.com.br"},{"name":"Daniel Arthaud","email":"daniel@vizir.com.br"},{"name":"Fabrício Campos","email":"fabricio@vizir.com.br"},{"name":"Handrus Nogueira","email":"handrus@gmail.com"},{"name":"Danilo Ribeiro","email":"danilo@ventrue.com.br"},{"name":"Murilo Portescheller","email":"murilo.portescheller@avanade.com"},{"name":"Giancarlo Bonansea","email":"giancarlo.bonansea@accenture.com"}],"homepage":"https://github.com/natura-cosmeticos/iris-nodejs-messenger#readme","bugs":{"url":"https://github.com/natura-cosmeticos/iris-nodejs-messenger/issues"},"keywords":["messaging","message-queue","message-bus","queue","sns","sqs","rabbitmq"],"license":"MIT","gitHead":"66bb007d6900b2a95363e774b19b70c740d179f4","description":"[![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/iris-nodejs-messenger/badge.svg?targetFile=package.json)](https://snyk.io/test/github/natura-cosmeticos/iris-nodejs-messenger?targetFile=package.json) [![Build Status](https://travis-","_id":"@naturacosmeticos/iris-nodejs-messenger@2.0.1","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-FfdpXfml9dMPKgShCRTrJTtMX4JihGGr3cgMTLlprHrWzJnT3tt1Djf8KSIF3d28CJax6u8hksI2R22d9VB2hA==","shasum":"d7e84fb290535fcb5deea67157aeaae1e6abd910","tarball":"https://registry.npmjs.org/@naturacosmeticos/iris-nodejs-messenger/-/iris-nodejs-messenger-2.0.1.tgz","fileCount":49,"unpackedSize":69896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUjMWCRA9TVsSAnZWagAAc6EP/1QiLvnD8mkKty2MMJ1I\n11gSWC1wbjenumtX6u2LMSLh/Jb7y+jZE7No6T1C3PN824uFAiXZMcFWYSHC\neJav/pxBskoGBfg5IeUAkeKtuZIMqoTsud0eQfQbEI4pOiYG70A5OiUCg5BI\nDWEiqIN4tZr3/h1J16Qiyj45Y31SvajhK47PrGHsZB0elmbwf4m6Xj3jK+Bx\nRHrC978y/gSp/q1TuXp+KLHmTbfEVv2BeKIMOZS3gkJ64Q8Pt6XRAQpRRMr1\nL2VhJntc9FAGv3Z+5ZConylhjka36o22OX9QjzG1H/0qcIuzQMm801p7pVqx\nRqFRjZ5eVrxdrJ6UVt2fpgdiszs54l9v0KwVBriwP4T6LKZWiQfBKjHt5K73\nyUVm05ZXjGZrQ6qgRy3yZf4DLXqYPlDpbc1b4rBZ6PDWEj/Tw0L2Ae9zZ640\nky46PUVOn14NcebW1r38vYvlzZm6aEou2QdHJ2n7f1/qIfCSVjvpLFcnO1wP\n8Q8NjMFJnZL4WwYcpEFvMx3ovBQFzSwq9DczKjR/y4zsQ6kYM6JEIyE1SRfH\n3jbkrjck7NIdP4GCmeQK0grKo8D/kl4W9OmJbTxfTDhdHYTZ4GaM6+Qg3mJO\n4GHRXFgied1w9fshF3eRO8tDLvT3Ab+fT9alqEyeRBXmfazWQ/Tq8peDAtBH\nhIJ1\r\n=76xe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0W2AutF0gj7vNu0rFH1ftNBRYxR6Hs5eVKm+foooOTQIhAOMzsEITLmB48T4wht1prLpKsZgGg+LgJ2wiyHN3wxTe"}]},"maintainers":[{"email":"arthaud@gmail.com","name":"darthaud"},{"email":"ffc.fabricio@gmail.com","name":"fabricioffc"},{"email":"handrus@gmail.com","name":"handrus"},{"email":"mport.dev@gmail.com","name":"mukaportes"}],"_npmUser":{"name":"handrus","email":"handrus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iris-nodejs-messenger_2.0.1_1565668115229_0.793219611833468"},"_hasShrinkwrap":false},"2.0.2":{"main":"index.js","name":"@naturacosmeticos/iris-nodejs-messenger","author":{"name":"Natura Cosméticos","email":"TDDAArquitetura@natura.net"},"version":"2.0.2","dependencies":{"@naturacosmeticos/async-hooks-storage":"^1.0.0","@naturacosmeticos/clio-nodejs-logger":"^2.0.0","amqplib":"^0.5.2","async":"^2.6.1","aws-sdk":"^2.505.0","lodash":"^4.17.10","uuid":"^3.3.2","snyk":"^1.189.0","sqs-consumer":"^5.3.0"},"devDependencies":{"chai":"^4.1.2","esdoc":"^1.1.0","esdoc-ecmascript-proposal-plugin":"^1.0.0","esdoc-node":"^1.0.3","esdoc-standard-plugin":"^1.0.0","eslint":"^5.3.0","@naturacosmeticos/eslint-config-natura":"^1.0.0","eslint-plugin-import":"^2.14.0","faker":"^4.1.0","humps":"^2.0.1","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^11.7.3","raw-body":"^2.3.3","sinon":"^5.0.6"},"scripts":{"docs":"esdoc -c .esdoc.json","lint":"eslint src/ test/","lint:fix":"eslint --fix src/ test/","start":"nodemon ./index.js","test":"mocha --recursive -r test/init.js --exit","test:coverage":"nyc mocha --recursive --exit","test:debug":"mocha --recursive --exit --no-timeouts --require architecture-node-base/test-debug","test:unit":"NODE_PATH=src:test mocha test/unit/ --recursive --exit","test:watch":"mocha --recursive -w --exit","snyk-protect":"snyk protect","prepublish":"npm run snyk-protect"},"nyc":{"all":true,"check-coverage":true,"per-file":true,"include":["src/**/*.js"],"exclude":["test/*.js"],"reporter":["lcov","text-summary"],"report-dir":"./coverage"},"contributors":[{"name":"Bruno Cartolari","email":"cartola@vizir.com.br"},{"name":"Daniel Arthaud","email":"daniel@vizir.com.br"},{"name":"Fabrício Campos","email":"fabricio@vizir.com.br"},{"name":"Handrus Nogueira","email":"handrus@gmail.com"},{"name":"Danilo Ribeiro","email":"danilo@ventrue.com.br"},{"name":"Murilo Portescheller","email":"murilo.portescheller@avanade.com"},{"name":"Giancarlo Bonansea","email":"giancarlo.bonansea@accenture.com"}],"homepage":"https://github.com/natura-cosmeticos/iris-nodejs-messenger#readme","bugs":{"url":"https://github.com/natura-cosmeticos/iris-nodejs-messenger/issues"},"keywords":["messaging","message-queue","message-bus","queue","sns","sqs","rabbitmq"],"license":"MIT","snyk":true,"gitHead":"d9acd614adff5a985ee66c8b789ca91300ef7692","description":"[![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/iris-nodejs-messenger/badge.svg?targetFile=package.json)](https://snyk.io/test/github/natura-cosmeticos/iris-nodejs-messenger?targetFile=package.json) [![Build Status](https://travis-","_id":"@naturacosmeticos/iris-nodejs-messenger@2.0.2","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-f7CugFUk+84N4HfTcXfPhVU9mi8TaT9KhsdPrgjrHajwFBuA9REMIC1b6CrTXk2PtcmwcALTWcDgINNIBMAjlA==","shasum":"5270c86ac206fe1e94cbb47aafe7ce0cf61a56b5","tarball":"https://registry.npmjs.org/@naturacosmeticos/iris-nodejs-messenger/-/iris-nodejs-messenger-2.0.2.tgz","fileCount":51,"unpackedSize":71348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqGphCRA9TVsSAnZWagAAN60P/iqiKeIrQhwhtVHc/Yun\nhRxlkiUPpyQGvqyadu5dDXlpS8lLw8GMeoUFUmFR9W/yJ7YHpl6dbTqwLhB+\nhTfeGJro4FGrGzt6HCxOZxtKl8Eb4pplXKMWkR+usw2UY6psklsfoaRTbFNN\nL6nlACiYjPwvikRWErLlwn64dr0tK9wIIWuZ19A2EAfoJcW0MmhP2+6rQExX\no8T1Hv/6H6yt39Y9oP1uqb0fW+TWx8+qq71HJF/uMyBLMWVoZ3ihRDrnmllc\nvd4UuOvd7p74N4U57iDRKMohICD+2Qq7GJVSFlMQ81cPlj/DxC2TOO4AUzRE\nzrCVCQ0FzW+7BymcQb/9ekWsQ5k/i4yolHItL2gOWn1oYLMA+8P9bNI1/Bmv\nagj5VRsIUJn7phjd5cC0Hd/8Y/JY0flpdrqXGdAyO/JIPM7VVLGpC5i01M+K\nxDz06cErKTtP2wtmbdKe/lNUV8RviwoUe5OerhXfKM92nhEgfZRXsDoVmfTf\nfSzgkob3K5PsHUvbgdCO8aOQHBs/b/V+KvAKbIjbuxRbN9cEBZ1nuyBEYp1e\nP6YSuVVpLR0MNz3OSmWPdY8lN8dTka+EDoQoA6AjAAYD6opMfVlYjkyCj5qG\nfHIBbByeDC4+CJcK2gWCTThvKYiCnruDpC7hdo7NDBtA8edAx0ClcNFPdWU2\nV71k\r\n=mAeS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8XJRULnbDPSFuy5SK5VGlIyal9+GddvXhWm4wPDQ+2AiAfOqjqntiDnDLQVDwZu3suFPauhVR85Y9cx4uHa+xVUQ=="}]},"maintainers":[{"email":"arthaud@gmail.com","name":"darthaud"},{"email":"ffc.fabricio@gmail.com","name":"fabricioffc"},{"email":"handrus@gmail.com","name":"handrus"},{"email":"mport.dev@gmail.com","name":"mukaportes"}],"_npmUser":{"name":"handrus","email":"handrus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iris-nodejs-messenger_2.0.2_1571318369001_0.18504082965307078"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-07T21:07:00.781Z","1.0.0":"2018-11-07T21:07:01.051Z","modified":"2024-02-19T17:01:27.515Z","2.0.0":"2019-08-03T02:55:37.084Z","2.0.1":"2019-08-13T03:48:35.461Z","2.0.2":"2019-10-17T13:19:29.119Z"},"maintainers":[{"email":"marcelofabricanti@hotmail.com","name":"marcelofabricanti"},{"email":"designsystem@natura.net","name":"designsystemnatura"},{"email":"mport.dev@gmail.com","name":"mukaportes"},{"email":"vicentelyrio@gmail.com","name":"vicentelyrio"},{"email":"matheusrobert8@gmail.com","name":"robert-lichtnow"},{"email":"douglasofreitas@gmail.com","name":"douglasofreitas"},{"email":"npm@jimmyandrade.com","name":"jimmyandrade"},{"email":"lauralucca@gmail.com","name":"lauralucca"},{"email":"marcelsaito@gmail.com","name":"marcelsaitonatura"},{"email":"eliisrael@gmail.com","name":"eliisrael"}],"description":"[![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/iris-nodejs-messenger/badge.svg?targetFile=package.json)](https://snyk.io/test/github/natura-cosmeticos/iris-nodejs-messenger?targetFile=package.json) [![Build Status](https://travis-","homepage":"https://github.com/natura-cosmeticos/iris-nodejs-messenger#readme","keywords":["messaging","message-queue","message-bus","queue","sns","sqs","rabbitmq"],"contributors":[{"name":"Bruno Cartolari","email":"cartola@vizir.com.br"},{"name":"Daniel Arthaud","email":"daniel@vizir.com.br"},{"name":"Fabrício Campos","email":"fabricio@vizir.com.br"},{"name":"Handrus Nogueira","email":"handrus@gmail.com"},{"name":"Danilo Ribeiro","email":"danilo@ventrue.com.br"},{"name":"Murilo Portescheller","email":"murilo.portescheller@avanade.com"},{"name":"Giancarlo Bonansea","email":"giancarlo.bonansea@accenture.com"}],"author":{"name":"Natura Cosméticos","email":"TDDAArquitetura@natura.net"},"bugs":{"url":"https://github.com/natura-cosmeticos/iris-nodejs-messenger/issues"},"license":"MIT","readme":"[![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/iris-nodejs-messenger/badge.svg?targetFile=package.json)](https://snyk.io/test/github/natura-cosmeticos/iris-nodejs-messenger?targetFile=package.json)\n[![Build Status](https://travis-ci.org/natura-cosmeticos/iris-nodejs-messenger.svg?branch=master)](https://travis-ci.org/natura-cosmeticos/iris-nodejs-messenger)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d94e41c2fc564657a1ed90a2483e50b7)](https://www.codacy.com/app/handrus_1938/iris-nodejs-messenger?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=natura-cosmeticos/iris-nodejs-messenger&amp;utm_campaign=Badge_Grade)\n\n\n# Iris Node.js Messenger\n\nThis project provides utilities to ease the communication between services.\n\nIris was created with the scenario where the local enviroment would use RabbitMQ and the production enviroment would use SNS and SQS services from AWS.\n\nYou can use that same interface to communicate with RabbitMQ and SNS/SQS. Providing an easy way to create integration tests without AWS Services.\n\nIn future versions we are planning to add new services like Kafka and ActiveMQ.\n\n## How to use\n\nInstall the package on your project using either npm or yarn:\n\n```bash\nnpm i '@naturacosmeticos/iris-nodejs-messenger'\n\nyarn add '@naturacosmeticos/iris-nodejs-messenger'\n```\n\nIn the following section we are going to present some examples, that can be found also inside `sample/readme`.\n\n### RabbitMQ\n\nFor now, RabbitMQ can be used only for developmentMode, so you need to pass `development` equals `true`.\n\n#### Sending messages\n\nThe `publish` will post a message inside the `checkout` exchange, that will fanout to the queue `checkout-messaging-services`.\n\n```javascript\nconst { PubSub: { Factory } } = require('@naturacosmeticos/iris-nodejs-messenger');\n\n// Create a AmqpMessageBus\nconst messageBus = Factory.create({\n  amqpOptions: {\n    serverUrl: 'amqp://rabbitmq',\n  },\n  developmentMode: true,\n});\n\n// Publish\nmessageBus.publish('checkout', { message: 'my message' });\n```\n\nYou can verify the message created accessing RabbitMQ Dashboard:\n\n* http://rabbitmq.messaging.localtest.me/#/\n* user: quest\n* password: quest\n\n#### Receiving messages\n\nNow to receive the messages posted you just need to pass an object where the attributes need to be the name of our exchange and the value a promise that will be executed.\n\n```javascript\nconst { Queue: { Factory } } = require('@naturacosmeticos/iris-nodejs-messenger');\n\nconst messageBus = Factory.create({\n  amqpOptions: {\n    serverUrl: 'amqp://rabbitmq',\n  },\n  developmentMode: true,\n});\n\nmessageBus.receive({\n  checkout: (message) => {\n    return new Promise((resolve) => {\n      console.log(message);\n      resolve(message);\n    });\n  },\n});\n```\n\n### AWS\n\n#### Sending messages\n\nBefore you test the following example you need to change some configurations in the `docker-compose.yml`:\n\n* Remove `SNS_ENDPOINT` and `SQS_ENDPOINT`. Those variables are only used when you want to test using the localstack container\n* Update `AWS_ACCOUNT_ID`, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` with your AWS user credentials. Also you may need to change the `AWS_REGION` variable, if you are not using `us-east-1`\n\n```javascript\nconst { PubSub: { Factory } } = require('@naturacosmeticos/iris-nodejs-messenger');\n\n// Create a SNSMessageBus\nconst messageBus = Factory.create({\n  awsSnsOptions: {\n    friendlyNamesToArn: {\n      checkout: process.env.ORDER_TOPIC_ARN,\n    },\n  },\n  developmentMode: false,\n});\n\n// Publish\nmessageBus.publish('checkout', { message: 'my message' })\n  .then((message) => {\n    console.log('message sent:', message);\n  });\n```\n\n#### Receiving messages\nUse this option when you have an SQS queue connected to a lambda function.\n\nExports your lambda handler like this:\n\n```javascript\nconst { Queue: { Aws: { LambdaHandler } } } = require('@naturacosmeticos/iris-nodejs-messenger');\n\nconst handler = new LambdaHandler({\n  [process.env.CHECKOUT_SQS_ARN]: {\n    friendlyName: 'checkout',\n    url: process.env.CHECKOUT_SQS_URL,\n  },\n}, {\n  checkout: (message) => {\n    return new Promise((resolve) => {\n      console.log(message);\n      resolve(message);\n    });\n  },\n});\n\nexports.index = handler.handle.bind(handler);\n```\n\n## How to contribute\n\nYou can contribute submitting [pull requests](https://github.com/natura-cosmeticos/iris-nodejs-messenger/pulls).\n\n### Setup\n\nTo setup your local env, you need to following these steps:\n\n* `docker network create messaging`\n* `docker-compose run messaging bash`, inside the container run `npm install`. After the packages installation, exit from the container\n* `docker-compose up`\n\n### Testing\n\nJust run `npm test` inside the container (`docker-compose exec messaging bash`).\n\n### Lint\n\nTo verify if any lint rule was broken run  inside the container: `npm run lint`.\n\n### Update docs\n\nRun `npm run docs` to generate a new documentation version.\n","readmeFilename":"README.md"}