Skip to content

vilindberg/webhook-amqp

Repository files navigation

Webhook/AMQP

A prototype of an asynchronous webhook using a message queue

Requirements

RabbitMQ Server

Getting started

Install dependencies

yarn install

Start a local rabbitmq server

rabbitmq-server

Start the webhook

node webhook

Start the subscriber api:s

Api one and two subscribes to random-event. Api three subscribes to another-event.
node api-one
node api-two
node api-three

Create consumer

node consumer

Publish events

Make sure to publish to the events that api-one, api-two and api-three subscribes to.
curl http://localhost:3000/publish/random-event
curl http://localhost:3000/publish/another-event

Note that you can publish events before starting the consumer. The consumer will pick up the events in the queue as soon as it starts.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors