Skip to content

josegomezr/ratoh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ratoh 🐁

RabbitMQ-to-Http bridge.

It listens to a RabbitMQ bus, and forwards messages as HTTP Requests.

Usage

Create a Config.pm, see the sample file for details. Then run:

# or just copy the sample with: cp Config.pm{.sample,}
./ratoh Config.pm

And wait for the requests in your HTTP server ✨

Testing

Have a RabbitMQ server available, if not, here's a container to the rescue:

docker run --rm -it -p 5672:5672 rabbitmq:3

It'll have by default the following exchanges:

amq.fanout	fanout
amq.topic	topic
amq.direct	direct

Adjust your Config.pm to use the exchange of your choice, this project was born out of listening to topic exchanges.

Alongisde the project is also provided devel_server.pl, a mojolicious minimal HTTP echo server. That coincidentally just works with the sample endpoints config.

# Start the server at 127.0.0.1:3000
perl devel_server.pl daemon

Now with all services up, send messages with the producer.pl:

bash producer.pl

Dependencies

Naming

Ratoh is similar "Ratón" (🐭) or "Rato" (undefined timespan between 2 minutes and 3 weeks in latin america).

About

Rabbit-to-HTTP bridge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors