RabbitMQ
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
broker Publish-Subscribe multi-protocoles : AMPQ, MQTT, STOMP ... RabbitMQ offre un mecanisme d'extension par des plugins (Erlang, ...)
Installation
Télécharger https://www.rabbitmq.com/download.html et installer
Configuration
Fichier de configuration à mettre dans ./etc/rabbitmq/rabbitmq.config
[ {mnesia, [{dump_log_write_threshold, 1000}]}, {rabbit, [{tcp_listeners, [5673]}]}, {rabbitmq_amqp1_0, [ {default_user, "guest"}, {protocol_strict_mode, false}]}, {rabbitmq_mqtt, [ {allow_anonymous, true}, {subscription_ttl, 1800000}, {prefetch, 10}, {tcp_listeners, [1883]} ]} ]. %% Memory-based Flow Control threshold. %% %% {vm_memory_high_watermark, 0.4}, %% Fraction of the high watermark limit at which queues start to %% page message out to disc in order to free up memory. %% %% {vm_memory_high_watermark_paging_ratio, 0.5}, %% Set disk free limit (in bytes). Once free disk space reaches this %% lower bound, a disk alarm will be set - see the documentation %% listed above for more details. %% %% {disk_free_limit, 50000000}, %% Alternatively, we can set a limit relative to total available RAM. %% %% {disk_free_limit, {mem_relative, 1.0}},
Démarrage
./start.sh
MQTT Test
Tester (avec les CLI Mosquitto#Command_lines)
BROKER=test.mosquitto.org BROKER=localhost mosquitto_sub -h $BROKER -d -t test/rabbitmq/temp
BROKER=localhost mosquitto_pub -h $BROKER -d -t test/rabbitmq/temp -m "20" mosquitto_pub -h $BROKER -d -t test/rabbitmq/temp -m "25"
AMPQ Test
- TODO with https://github.com/postwait/node-amqp