rabbitmq-tutorials/perl
Michael Klishin 82904ea114
Closes #286
2021-04-09 21:44:27 +03:00
..
emit_log_direct.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00
emit_log_topic.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00
emit_log.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00
new_task.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00
README.md Closes #286 2021-04-09 21:44:27 +03:00
receive_logs_direct.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00
receive_logs_topic.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00
receive_logs.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00
receive.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00
rpc_client.pl fix for not shared variables in response callback. it fixes numerous calls to rpc. 2016-01-27 13:34:10 +06:00
rpc_server.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00
send.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00
worker.pl Improve perl tutorial files. 2012-07-11 09:18:12 -07:00

Perl code for RabbitMQ tutorials

Here you can find Perl code examples from RabbitMQ tutorials.

To successfully use the examples you will need a running RabbitMQ server.

Requirements

To run this code you need to install Net::RabbitFoot.

cpan -i Net::RabbitFoot

For tutorial six UUID::Tiny needs to be installed.

cpan -i UUID::Tiny

There are known problems with the the Net::RabbitFoot module:

  • The MooseX::AttributeHelpers dependency has been deprecated and no longer builds on Perl 5.18
  • The library tests fail on 32bit systems

On Ubuntu:

sudo apt-get install make libclass-data-inheritable-perl libtest-deep-perl libmoosex-app-cmd-perl libcoro-perl libjson-xs-perl libxml-libxml-perl libconfig-any-perl libmoosex-attributehelpers-perl libmoosex-configfromfile-perl libtest-exception-perl libfile-sharedir-perl libreadonly-xs-perl libuuid-tiny-perl
sudo cpan -i Net::RabbitFoot

Code

Tutorial one: "Hello World!"

perl send.pl
perl receive.pl

Tutorial two: Work Queues

perl new_task.pl "A very hard task which takes two seconds.."
perl worker.pl

Tutorial three: Publish/Subscribe

perl receive_logs.pl
perl emit_log.pl "info: This is the log message"

Tutorial four: Routing

perl receive_logs_direct.pl info
perl emit_log_direct.pl info "The message"

Tutorial five: Topics

perl receive_logs_topic.pl "*.rabbit"
perl emit_log_topic.pl red.rabbit Hello

Tutorial six: RPC

perl rpc_server.pl
perl rpc_client.pl