Skip to content

Latest commit

 

History

History
56 lines (46 loc) · 3.28 KB

File metadata and controls

56 lines (46 loc) · 3.28 KB

useful scripts & configs for rabbitmq & mongodb

This folder not contain any JS codes.
As this project depend on RabbitMQ and MongoDB, this folder contains some bat scripts and configs examples and help notes.

enable RabbitMQ Delayed Message Plugin

In a word, download a .ez file to RabbitMQ's plugins dir, then excecute a command in cmd to enable that. see bat located in other_tools

enable RabbitMQ Web MQTT plugin

in a word, that's RabbitMQ's builtin plugin, just execute one command in cmd, that's done. see bat located in other_tools

modify RabbitMQ's TTL & expires for messages

https://www.rabbitmq.com/ttl.html#message-ttl-using-policy
This value already set in JS codes.

// messages auto expires after 24 hours
// for windows
cd /d "C:\Program Files\RabbitMQ Server\rabbitmq_server-3.9.13\sbin"
rabbitmqctl set_policy TTL ".*" "{""message-ttl"":2160000}" --apply-to queues

in a word, RabbitMQ do not have a default ttl / expire time set. you have to modify this.

modify RabbitMQ's Delivery Acknowledgement Timeout

https://www.rabbitmq.com/consumers.html#acknowledgement-timeout
This value already set in docker. in rabbitmq.conf, add

consumer_timeout = 80000000  

for RabbitMQ config file location:

RabbitMQ official doc , github mirror for configs.
Example RabbitMQ configs located at github

In a word, create rabbitmq.conf or advanced.config,
in Windows %APPDATA%\RabbitMQ\;
in Linux /etc/rabbitmq/;
in Mac OS ${install_prefix}/etc/rabbitmq/, ( homebrew's ${install_prefix} should be /usr/local).

for MongoDB & RabbitMQ security in production

#15 (auth and safety)
#16 (production configs)

windows trouble shooting

docker/for-win#3171 (comment)
https://stackoverflow.com/questions/65272764/ports-are-not-available-listen-tcp-0-0-0-0-50070-bind-an-attempt-was-made-to