EOSIO RabbitMQ Plugin
yum install librabbitmq-devel.x86_64
or
apt-get install librabbitmq-dev
or
git clone https://github.com/alanxz/rabbitmq-c.git
cd rabbitmq-c/cmake
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
sudo cmake --build . --config Release --target install
#cd /usr/local/eos/plugins/
#git clone https://github.com/tmuskal/eos-rabbitmq-plugin.git rabbitmq_plugin
edit /usr/local/eos/plugins/CMakeLists.txt:
#add_subdirectory(rabbitmq_plugin)
edit /usr/local/eos/programs/nodeos/CMakeLists.txt:
#target_link_libraries( nodeos PRIVATE -Wl,${whole_archive_flag} rabbitmq_plugin -Wl,${no_whole_archive_flag} )
Enable this plugin using --plugin option to nodeos or in your config.ini. Use nodeos --help to see options used by this plugin.
rabbitmqadmin declare exchange name=trx.accepted type=direct durable=true internal=false 'arguments={"alternate-exchange":"trx.accepted_alt.fanout"}'
rabbitmqadmin declare exchange name=trx.applied type=direct durable=true internal=false 'arguments={"alternate-exchange":"trx.accepted_alt.fanout"}'
Add the following to config.ini to enable the plugin:
parameters for rabbitmq_plugin
# --plugin eosio::rabbitmq_plugin
# --rabbitmq-hostname 192.168.31.225
# --rabbitmq-port 5672
# --rabbitmq-username guest
# --rabbitmq-password guest
# --rabbitmq-accept-trx-exchange trx.accepted
# --rabbitmq-applied-trx-exchange trx.applied
# --rabbitmq-block-start 100
# --rabbitmq-queue-size 5000
- requeue on publish failure