1 Star 0 Fork 0

zhzhouq9/rabbitmq-tutorials

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/zhzhouq9/rabbitmq-tutorials.git
git@gitee.com:zhzhouq9/rabbitmq-tutorials.git
zhzhouq9
rabbitmq-tutorials
rabbitmq-tutorials
master

搜索帮助