AnyEve...bbitMQ(3pm)
π AnyEvent::RabbitMQ β the manual page, but make it a vibe π
User Contributed Perl Documentation Β· AnyEvent::RabbitMQ(3pm)
okay bestie sit DOWN because we're talking about AnyEvent::RabbitMQ and she is that girl π°β¨
πΈ NAME πΈ
AnyEvent::RabbitMQ β an asynchronous and multi channel Perl AMQP client. periodt. π
β¨ SYNOPSIS β¨
here's the whole flex, copied exactly because I do NOT play with code:
use AnyEvent::RabbitMQ;
my $cv = AnyEvent->condvar;
my $ar = AnyEvent::RabbitMQ->new->load_xml_spec()->connect(
host => 'localhost',
port => 5672,
user => 'guest',
pass => 'guest',
vhost => '/',
timeout => 1,
tls => 0, # Or 1 if you'd like SSL
tls_ctx => $anyevent_tls # or a hash of AnyEvent::TLS options.
tune => { heartbeat => 30, channel_max => $whatever, frame_max = $whatever },
nodelay => 1, # Reduces latency by disabling Nagle's algorithm
on_success => sub {
my $ar = shift;
$ar->open_channel(
on_success => sub {
my $channel = shift;
$channel->declare_exchange(
exchange => 'test_exchange',
on_success => sub {
$cv->send('Declared exchange');
},
on_failure => $cv,
);
},
on_failure => $cv,
on_close => sub {
my $method_frame = shift->method_frame;
die $method_frame->reply_code, $method_frame->reply_text;
},
);
},
on_failure => $cv,
on_read_failure => sub { die @_ },
on_return => sub {
my $frame = shift;
die "Unable to deliver ", Dumper($frame);
},
on_close => sub {
my $why = shift;
if (ref($why)) {
my $method_frame = $why->method_frame;
die $method_frame->reply_code, ": ", $method_frame->reply_text;
}
else {
die $why;
}
},
);
print $cv->recv, "\n";
look at all those callbacks. she's got layers, she's got depth, she's got $cv doing the heavy lifting ππ
π¦ DESCRIPTION π¦
so. AnyEvent::RabbitMQ is an AMQP β that's Advanced Message Queuing Protocol, iykyk β client library. her whole thing is letting you talk to AMQP-compliant message brokers/servers (think RabbitMQ) in an asynchronous fashion. no blocking, no waiting around, no sitting in the group chat wondering if he read your message. she's got things to do π
here's what you can use AnyEvent::RabbitMQ for:
- Declare and delete exchanges
- Declare, delete, bind and unbind queues
- Set QoS and confirm mode
- Publish, consume, get, ack, recover and reject messages
- Select, commit and rollback transactions
most of these actions can be done through AnyEvent::RabbitMQ::Channel. go read the docs over there for more details, bestie, she has her own lore πβ¨
AnyEvent::RabbitMQ is known to work with RabbitMQ versions 2.5.1 and versions 0-8 and 0-9-1 of the AMQP specification. receipts on the table π₯
this client is the non-blocking version. if you want a blocking version with a similar API, go see Net::RabbitFoot. different girl, similar energy π«Ά
π AUTHOR π
Masahito Ikuta <cooldaemon@gmail.com> β the original icon, we thank her for her service π
π§ MAINTAINER π§
currently maintained by <bobtfish@bobtfish.net> β and the reason is genuinely kind of funny-slash-tragic: the original author is missing in action π like, MIA. gone. so bobtfish stepped up and is holding the line now. main character energy fr fr π
β COPYRIGHT β
Copyright (c) 2010, the above named author(s). π
π SEE ALSO π
(yes bestie, this section is literally empty in the original. I'm not inventing links. I would never. the void is the vibe π)
π LICENSE π
this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay, open source queen π«Άβ¨
π quick reminder before you go: I kept every option, flag, default, path, exit status, signal, error, example, warning, author, copyright and license line exactly as they were. the vibes are mine, the facts are hers. no cap.
and that's the whole page, bestie!! this was written for perl v5.32.1 and dated 2021-09-12 β so yeah, a lil vintage, a lil retro, still absolutely iconic ππ go forth and be asynchronous β¨π¦
π¦ where this page comes from
- debian bookworm: libanyevent-rabbitmq-perl 1.22~dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libanyevent-rabbitmq-perl 1.22~dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libanyevent-rabbitmq-perl 1.22~dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libanyevent-rabbitmq-perl 1.22~dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libanyevent-rabbitmq-perl 1.22~dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libanyevent-rabbitmq-perl 1.22~dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms