Mojo::...nsumer(3pm)
π Mojo::RabbitMQ::Client::Consumer β the whole vibe π
okay so bestie, this is a page from the User Contributed Perl Documentation (that's the manual name, iykyk πΈ), and it's all about Mojo::RabbitMQ::Client::Consumer β literally a simple Mojo::RabbitMQ::Client-based consumer. no cap, that's the whole NAME section. π«Ά
β¨ SYNOPSIS β¨
here's the whole thing, copy-paste ready, not me changing a single character π
use Mojo::RabbitMQ::Client::Consumer;
my $consumer = Mojo::RabbitMQ::Consumer->new(
url => 'amqp://guest:guest@127.0.0.1:5672/?exchange=mojo&queue=mojo',
defaults => {
qos => {prefetch_count => 1},
queue => {durable => 1},
consumer => {no_ack => 0},
}
);
$consumer->catch(sub { die "Some error caught in Consumer" } );
$consumer->on('success' => sub { say "Consumer ready" });
$consumer->on(
'message' => sub {
my ($consumer, $message) = @_;
$consumer->channel->ack($message)->deliver;
}
);
$consumer->consume_p->wait;
Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
likeβ¦ look at her go π the catch grabs errors, success fires when the consumer's ready, message fires per message and acks + delivers it, then consume_p->wait blocks, and finally Mojo::IOLoop->start kicks the loop off unless it's already running. main character energy fr fr π
π DESCRIPTION π
so the DESCRIPTION section is lowkey just vibing here β it's empty in this page, no extra tea π (which honestly just means the synopsis above is doing all the talking π).
π¦ EVENTS π¦
Mojo::RabbitMQ::Client::Consumer inherits all events from Mojo::EventEmitter and can emit the following new ones.
(and that's it β the list of new ones isn't spelled out here, so don't come for me π)
π ATTRIBUTES π
Mojo::RabbitMQ::Client::Consumer has following attributes.
(yep, that's the whole section β iconic in its minimalism, honestly β¨)
πΈ METHODS πΈ
Mojo::RabbitMQ::Client::Consumer inherits all methods from Mojo::EventEmitter and implements the following new ones.
(same deal β the list of new ones isn't written out on this page π)
π SEE ALSO π
Mojo::RabbitMQ::Clientβ the parent, the blueprint, the blueprint-y icon π
π COPYRIGHT AND LICENSE π
Copyright (C) 2015-2017, Sebastian Podjasek and others
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
fr fr, it's free software β remix it, share it, just respect the Artistic License version 2.0 terms, periodt π
and that's the whole page bestie!! πβ¨
cute little sign-off so you know where this came from: π«Ά generated by perl v5.42.0, dated 2019-08-25, and it's the Mojo::...nsumer(3pm) page (the truncated name is just how the manual displays it, don't @ me π). slay, go build your consumer πππ¦
π¦ where this page comes from
- opensuse-leap 16.0: perl-Mojo-RabbitMQ-Client 0.3.1-bp160.1.4 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms