An opinionated RabbitMQ worker. This package provides a very simple and easy to use rabbit worker that consumes messages, handles them and responds accordingly. The worker abstracts rabbit layer and handles connectivity for you and let you foucs on implementing your logic and microservices.
npm install rabbit-task
var Connection = Connection;var Worker = Worker;var conn = processenvconnectionString;var router = ; // Define your message handlers// Start a worker and define queuesvar worker ='my-awesome-worker'conn'my-work-queue'routerPromise // Config phase;workerstart;
For a more detailed exmaple take a look at our calculator example ## Docs coming soon (defaultHandler docs too)