Skip to content

crashingdaily/rabbitmq-tutorials-perl

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

RabbitMQ Tutorials - Perl

Ports of the Python RabbitMQ tutorials to Perl using Net::RabbitMQ.

Requirements

To successfully use the examples you will need a running RabbitMQ server. The scripts as written expect the RabbitMQ server to be on localhost, port 5672, guest/guest username/password. The mheiges/vagrant-rabbitmq Vagrant VM is one source of a suitable RabbitMQ for these tutorials.

The Perl scripts use Net::RabbitMQ. I use version 0.2.8 .

curl -LO http://www.cpan.org/authors/id/J/JE/JESUS/Net--RabbitMQ-0.2.8.tar.gz
tar zxf Net--RabbitMQ-0.2.8.tar.gz
cd Net--RabbitMQ-0.2.8
perl Makefile.PL
make
make install

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 10

The porting of Tutorial six differs a little from the Python original in that the Perl port accepts an optional value on the command line (default 30).

About

RabbitMQ tutorials using Net::RabbitMQ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages