These are Raku versions of the Rabbit MQ Tutorial examples. They cover the basic patterns for creating messaging applications with Raku and Rabbit MQ.
You will need to have Rabbit MQ installed as well as Raku and the client library Net::AMQP.
Assuming you have a working Rakudo installation you can install Net::AMQP directly with:
zef install Net::AMQP
You will need at least version v0.1.15 for these examples to work properly.
In all of the examples it is assumed that the RabbitMQ server is running on the local machine with the default
configuration, if this not the case then you can pass the differing items to the Net::AMQP
constructor:
my $n = Net::AMQP.new(host => 'localhost' port => 5672, login => 'guest', password => 'guest', vhost => '/');
(The above shows the defaults but you should supply the appropriate values for your configuration.)
This is the simplest example that does something, a client that sends a simple message to the broker and a single single subscriber that prints what it receives.
An example demonstrating how tasks can be distributed among a pool of workers.
Demonstration of how a single message can be published to multiple consumers at once.
Selectively receiving message based on a publisher supplied key.
Selectively receiving messages based on pattern matching.
Remote procedure calls implemented on a message queue.