Sign inSign up

thiagobarradas/queue-consumer

By thiagobarradas

•Updated over 3 years ago

Image
0

10K+

thiagobarradas/queue-consumer repository overview

⁠QueueConsumer

A simple consumer for Rabbit MQ sending a post with basic auth and all structure for retry and dead queue;

⁠Demo

Running demo/docker-compose.yml to see. It's magic ;)

⁠Running with Docker

docker run --name queue-consumer -d \
    -e QueueConnectionString="amqp://user:pass@localhost:5672/current-vh" \
    -e QueueName=my-demo-queue \
    -e Url=http://pruu.herokuapp.com/dump/queue-consumer \
    -e User=user \
    -e Pass=password \
    -e TimeoutInSeconds=30 \
    -e MaxThreads=100 \
    -e PopulateQueueQuantity=10000 \
    -e RetryCount=5 \        
    -e RetryTTL=300000 \
    thiagobarradas/queue-consumer:latest

⁠Configuration

Set environment variables to setup QueueConsumer:

Env VarTypeRequiredDescriptione.g.
QueueConnectionStringstringyesrabbit connectionamqp://user:pass@localhost:5672/current-vh
QueueNamestringyesorigin queue name and prefix for retry/dead queuessome-queue
Urlstringyesurl to send post with content as json bodyhttps://domain.com/service/v1/hook
Userstringnobasic auth usernameusername
Passstringnobasic auth passwordpassword
TimeoutInSecondsintnotimeout to send post60 default
MaxThreadsintnothread parallel max number20 default
PopulateQueueQuantityintnosend messages to populate main queue, 0 to disable0 default
RetryCount intnomax number of retries, 0 to disable5 default
RetryTTLintnottl in ms to retry a message, 0 to disable60000 default

⁠Generated queues/exchanges/routing-keys

QueueExchangeRouting Key
{QueueName}{QueueName}-exchange{QueueName}-routing-key
{QueueName}-retry{QueueName}-retry-exchange{QueueName}-retry-routing-key
{QueueName}-dead{QueueName}-dead-exchange{QueueName}-dead-routing-key

⁠How can I contribute?

Please, refer to CONTRIBUTING⁠

⁠Found something strange or need a new feature?

Open a new Issue following our issue template ISSUE TEMPLATE⁠

⁠Did you like it? Please, make a donate :)

if you liked this project, please make a contribution and help to keep this and other initiatives, send me some Satochis.

BTC Wallet: 1G535x1rYdMo9CNdTGK3eG6XJddBHdaqfX

1G535x1rYdMo9CNdTGK3eG6XJddBHdaqfX

Tag summary

Content type

Image

Digest

sha256:79e72c09c…

Size

84.2 MB

Last updated

over 3 years ago

docker pull thiagobarradas/queue-consumer