Mojo::...Publish(3pm)

πŸ’… Mojo::...Publish(3pm) β€” aka Mojo::RabbitMQ::Client::Method::Publish

okay so bestie, welcome to the Perl docs page for Mojo::RabbitMQ::Client::Method::Publish (the file header calls it Mojo::...Publish(3pm) because manpage headers love an abbreviation moment πŸŽ€). It's one single class that does all of the AMQP Publish method magic β€” like, the whole vibe, one class, no cap. ✨


🌸 NAME 🌸

Mojo::RabbitMQ::Client::Method::Publish β€” a single class to do all of AMQP Publish method magic. literally its whole job. iconic behavior honestly πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole little routine, copy it exactly as written (yes, exactly β€” including that one spot where a comma is just... not there. it's fine. we don't fix, we accept 🫢):

use Mojo::RabbitMQ::Client::Method::Publish;

my $method = Mojo::RabbitMQ::Client::Method::Publish->new(
  client => $client,
  channel => $channel
)->setup(
  exchange    => 'mojo',
  routing_key => '',
  header      => {}
  body        => 'mojo',
  mandatory   => 0,
  immediate   => 0,
)->deliver();

so you new it up with a client and a channel, you setup it with your publish args, and then you deliver(). chain 'em and go. ✨


🧚 DESCRIPTION 🧚

Mojo::RabbitMQ::Client::Method::Publish is a special class whose entire purpose in life is to implement the AMQP message publish workflow. that's it. that's the whole personality. obsessed honestly πŸ’–


πŸ”₯ EVENTS πŸ”₯

Mojo::RabbitMQ::Client::Method::Publish inherits all events from Mojo::RabbitMQ::Client::Method. all of them. every single one. it's giving nepo baby but make it code πŸ’€


⭐ ATTRIBUTES ⭐

Mojo::RabbitMQ:Client:::Method::Publish inherits all attributes from Mojo::RabbitMQ::Client::Method. (yes, that's exactly how it's spelled on the page β€” three colons and all. we do not edit. we respect the chaos πŸ™ˆ)


πŸ‘‘ METHODS πŸ‘‘

Mojo::RabbitMQ::Client::Method::Publish inherits all methods from Mojo::RabbitMQ::Client::Method, with the following changes:

✨ setup

$method = $method->setup($arguments);

this bad boy only accepts the common arguments for the message publish chain, which are, in order:

🌈 Frame::Method

  • Basic::Publish
    • exchange
    • routing_key
    • mandatory
    • immediate

🌈 Frame::Header

  • Basic::ContentHeader
    • header
    • weight

🌈 Frame::Body

  • body (as payload)

so like... Frame::Method wraps Basic::Publish which takes exchange, routing_key, mandatory and immediate. then Frame::Header wraps Basic::ContentHeader which takes header and weight. then Frame::Body takes body as the payload. that's the whole stack, bestie β€” three frames, all the args, main character energy all the way down 🫢✨


πŸ“ SEE ALSO πŸ“

go read these next, they're the friend group:

  • Mojo::RabbitMQ::Client::Method
  • Mojo::RabbitMQ::Client::Channel
  • Mojo::RabbitMQ::Client

iykyk πŸ’œ


copy this part straight, k? legal text is not the place for creative liberties πŸ’…

Copyright (C) 2015-2017, Sebastian Podjasek and others

Based on AnyEvent::RabbitMQ β€” Copyright (C) 2010 Masahito Ikuta, maintained by "bobtfish@bobtfish.net"

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.


aaaand that's the page, hope it slayed πŸ’– this was perl v5.42.0, dated 2019-08-25, dropping the Mojo::...Publish(3pm) header on the way out β€” see u in the group chat, bestie πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from