[Catalyst] Catalyst::Model::RabbitMQ

Gianni Ceccarelli dakkar at thenautilus.net
Sat Aug 18 19:36:42 GMT 2012

I'm using a combination of CatalystX::ComponentsFromConfig and Net::Stomp::Producer. The first (t0m's code, even if released by me) allows you to avoid writing essentially empty model classes (and to apply roles via configuration file). The second is the one that actually deals with messaging. As the name implies it's using STOMP, but there's actually rather little in the interface that depends on it. It works like this:

- a "send" method takes a destination (queue name, whatever), a hashref of headers (including a 'type', that I imagine being similar to RabbitMQ's routing key), and a byte string for the message payload
- if the message payload is a reference, it is passed through a serialiser
- a "transform_and_send" method allows you to pass some internal representation, and having the logic to transform it into a message in a specialised class

We've been using something very similar at $work for a coulpe of years now, and it seems to be simple and flexible enough.
  dakkar - mobilis in mobile

More information about the Catalyst mailing list