Net::A...l::v0_8(3pm)
โจ NAME โจ
Okay so this is the Net::AMQP::Protocol::v0_8(3pm) page โ User Contributed Perl Documentation โ and the NAME line is Net::AMQP::Protocol::v0_8 โ AMQP v0.8 (de)serialization and representation. That's the whole name vibe, bestie. ๐
๐ฆ SYNOPSIS ๐ฆ
Here's the code energy, no cap:
use Net::AMQP::Protocol::v0_8;
...
my @frames = Net::AMQP->parse_raw_frames(\$input);
...
my $frame = Net::AMQP::Frame::Method->new(
channel => 0,
method_frame => Net::AMQP::Protocol::Connection::StartOk->new(
client_properties => { ... },
mechanism => 'AMQPLAIN',
locale => 'en_US',
response => {
LOGIN => 'guest',
PASSWORD => 'guest',
},
),
);
print OUT $frame->to_raw_frame();
๐ธ DESCRIPTION ๐ธ
This module implements the frame (de)serialization and representation of the Advanced Message Queue Protocol (http://www.amqp.org/) version 0.8.
It is to be used in conjunction with client or server software that does the actual TCP/IP communication. Like, this module handles the AMQP frame representation/serialization situation; the client/server software handles the actual TCP/IP talking. ๐ซถ
๐ PROTOCOL CLASSES ๐
๐ Net::AMQP::Protocol::Connection::Start ๐
This class implements the class Connection method Start, which is a synchronous method.
This method starts the connection negotiation process by telling the client the protocol version that the server proposes, along with a list of security mechanisms which the client can use for authentication.
Each field below is a field in the specification, an optional argument to new(), and a read/write accessor:
version_major(type:octet) โ Protocol major version: the protocol major version that the server agrees to use, which cannot be higher than the client's major version.version_minor(type:octet) โ the page labels this Protocol major version (yes, really), and the actual description is: the protocol minor version that the server agrees to use, which cannot be higher than the client's minor version.server_properties(type:table) โ Server properties.mechanisms(type:longstr) โ Available security mechanisms: a list of the security mechanisms that the server supports, delimited by spaces. Currently ASL supports these mechanisms:PLAIN.locales(type:longstr) โ Available message locales: a list of the message locales that the server supports, delimited by spaces. The locale defines the language in which the server will send reply texts.
๐ Net::AMQP::Protocol::Connection::StartOk ๐
This class implements the class Connection method StartOk, which is a synchronous method.
This method selects a SASL security mechanism. ASL uses SASL (RFC2222) to negotiate authentication and encryption.
Each field below is a field in the specification, an optional argument to new(), and a read/write accessor:
client_properties(type:table) โ Client properties.mechanism(type:shortstr) โ Selected security mechanism: a single security mechanisms selected by the client, which must be one of those specified by the server. (Yep, โmechanismsโ plural, that's what it says.)response(type:longstr) โ Security response data: a block of opaque data passed to the security mechanism. The contents of this data are defined by the SASL security mechanism. For thePLAINsecurity mechanism this is defined as a field table holding two fields,LOGINandPASSWORD.locale(type:shortstr) โ Selected message locale: a single message local selected by the client, which must be one of those specified by the server. (Yep, โlocalโ not โlocaleโ, I'm just the messenger. ๐)
๐ง Net::AMQP::Protocol::Connection::Secure ๐ง
This class implements the class Connection method Secure, which is a synchronous method.
The SASL protocol works by exchanging challenges and responses until both peers have received sufficient information to authenticate each other. This method challenges the client to provide more information.
Each field below is a field in the specification, an optional argument to new(), and a read/write accessor:
challenge(type:longstr) โ Security challenge data: challenge information, a block of opaque binary data passed to the security mechanism.
โญ Net::AMQP::Protocol::Connection::SecureOk โญ
This class implements the class Connection method SecureOk, which is a synchronous method.
This method attempts to authenticate, passing a block of SASL data for the security mechanism at the server side.
Each field below is a field in the specification, an optional argument to new(), and a read/write accessor:
response(type:longstr) โ Security response data: a block of opaque data passed to the security mechanism. The contents of this data are defined by the SASL security mechanism.
๐ Net::AMQP::Protocol::Connection::Tune ๐
This class implements the class Connection method Tune, which is a synchronous method.
This method proposes a set of connection configuration values to the client. The client can accept and/or adjust these.
Each field below is a field in the specification, an optional argument to new(), and a read/write accessor:
channel_max(type:short) โ Proposed maximum channels: the maximum total number of channels that the server allows per connection. Zero means that the server does not impose a fixed limit, but the number of allowed channels may be limited by available server resources.frame_max(type:long) โ Proposed maximum frame size: the largest frame size that the server proposes for the connection. The client can negotiate a lower value. Zero means that the server does not impose any specific limit but may reject very large frames if it cannot allocate resources for them.heartbeat(type:short) โ Desired heartbeat delay: the delay, in seconds, of the connection heartbeat that the server wants. Zero means the server does not want a heartbeat.
๐ Net::AMQP::Protocol::Connection::TuneOk ๐
This class implements the class Connection method TuneOk, which is a synchronous method.
This method sends the client's connection tuning parameters to the server. Certain fields are negotiated, others provide capability information.
Each field below is a field in the specification, an optional argument to new(), and a read/write accessor:
channel_max(type:short) โ Negotiated maximum channels: the maximum total number of channels that the client will use per connection. May not be higher than the value specified by the server.frame_max(type:long) โ Negotiated maximum frame size: the largest frame size that the client and server will use for the connection. Zero means that the client does not impose any specific limit but may reject very large frames if it cannot allocate resources for them. Note that the frame-max limit applies principally to content frames, where large contents can be broken into frames of arbitrary size.heartbeat(type:short) โ Desired heartbeat delay: the delay, in seconds, of the connection heartbeat that the client wants. Zero means the client does not want a heartbeat.
๐ฆ Net::AMQP::Protocol::Connection::Open ๐ฆ
This class implements the class Connection method Open, which is a synchronous method.
This method opens a connection to a virtual host, which is a collection of resources, and acts to separate multiple application domains within a server.
Each field below is a field in the specification, an optional argument to new(), and a read/write accessor:
virtual_host(type:shortstr) โ Virtual host name: the name of the virtual host to work with.capabilities(type:shortstr) โ Required capabilities: the client may specify a number of capability names, delimited by spaces. The server can use this string to how to process the client's connection request.insist(type:bit) โ Insist on connecting to server: in a configuration with multiple load-sharing servers, the server may respond to aConnection.Openmethod with aConnection.Redirect. Theinsistoption tells the server that the client is insisting on a connection to the specified server.
๐ซถ Net::AMQP::Protocol::Connection::OpenOk ๐ซถ
This class implements the class Connection method OpenOk, which is a synchronous method.
This method signals to the client that the connection is ready for use.
Each field below is a field in the specification, an optional argument to new(), and a read/write accessor:
known_hosts(type:shortstr) โ no description given.
๐ Net::AMQP::Protocol::Connection::Redirect ๐
This class implements the class Connection method Redirect, which is a synchronous method.
This method redirects the client to another server, based on the requested virtual host and/or capabilities.
Each field below is a field in the specification, an optional argument to new(), and a read/write accessor:
host(type:shortstr) โ Server to connect to: specifies the server to connect to. This is an IP address or a DNS name, optionally followed by a colon and a port number. If no port number is specified, the client should use the default port number for the protocol.known_hosts(type:shortstr) โ no description given.
๐ Net::AMQP::Protocol::Connection::Close ๐
This class implements the class Connection method Close, which is a synchronous method.
This method indicates that the sender wants to close the connection. This may be due to internal conditions (e.g. a forced shut-down) or due to an error handling a specific method, i.e. an exception. When a close is due to an exception, the sender provides the class and method id of the method which caused the exception.
Each field below is a field in the specification, an optional argument to new(), and a read/write accessor:
reply_code(type:short) โ no description given.reply_text(type:shortstr) โ no description given.class_id(type:short) โ Failing method class: when the close is provoked by a method exception, this is the class of the method.method_id(type:short) โ Failing method ID: when the close is provoked by a method exception, this is the ID of the method.
โจ Net::AMQP::Protocol::Connection::CloseOk โจ
This class implements the class Connection method CloseOk, which is a synchronous method.
This method confirms a Connection.Close method and tells the recipient that it is safe to release resources for the connection and close the socket.
This class has no fields nor accessors.
๐ธ Net::AMQP::Protocol::Channel::Open ๐ธ
This class implements the class Channel method Open, which is a synchronous method.
This one opens up a virtual connection (aka a channel) โ like sliding into a DM with the broker. ๐
Each thing below is a field in the spec. They're the optional args you pass to new(), and they double as read/write accessors:
out_of_band(type: shortstr) โ out-of-band settings. It configures out-of-band transfers on this channel. The syntax and meaning of this field will be formally defined at a later date (so like... TBD bestie, don't @ me).
Net::AMQP::Protocol::Channel::OpenOk
This class implements the class Channel method OpenOk, and it's a synchronous method.
It signals to the client that the channel is ready for use. That's it, that's the whole vibe โ you're in. โจ
This class has no fields nor accessors.
Net::AMQP::Protocol::Channel::Flow
This class implements the class Channel method Flow, and it's a synchronous method.
It asks the peer to pause or restart the flow of content data. Think of it as a simple flow-control mechanism a peer can use to avoid overflowing its queues, or otherwise finding itself receiving more messages than it can actually process. ๐ Heads up though โ this method is not intended for window control. The peer that receives a request to stop sending content should finish sending the current content (if there is any), and then wait until it receives a Flow restart method.
Each thing below is a field in the spec. They're the optional args to new() and also read/write accessors:
active(type: bit) โ start/stop content frames. If1, the peer starts sending content frames. If0, the peer stops sending content frames. Binary queen. ๐
Net::AMQP::Protocol::Channel::FlowOk
This class implements the class Channel method FlowOk, and it's an asynchronous method.
It confirms to the peer that a flow command was received and processed. Receipt acknowledged, no cap. ๐ซถ
Each thing below is a field in the spec. They're the optional args to new() and also read/write accessors:
active(type: bit) โ current flow setting. Confirms the setting of the processedflowmethod:1means the peer will start sending or continue to send content frames;0means it will not.
Net::AMQP::Protocol::Channel::Alert
This class implements the class Channel method Alert, and it's an asynchronous method.
This is the method that lets the server send a non-fatal warning to the client. It's used for methods that are normally asynchronous and therefore don't have confirmations, and for which the server may detect errors that need to be reported. Fatal errors are handled as channel or connection exceptions instead; non-fatal errors get sent through this method. โ ๏ธ
Each thing below is a field in the spec. They're the optional args to new() and also read/write accessors:
reply_code(type: short)reply_text(type: shortstr)details(type: table) โ detailed information for warning. A set of fields that provide more information about the problem. The meaning of these fields is defined on a per-reply_codebasis (TO BE DEFINED โ yeah, iykyk, we're waiting on it ๐ญ).
Net::AMQP::Protocol::Channel::Close
This class implements the class Channel method Close, and it's a synchronous method.
This method indicates that the sender wants to close the channel โ maybe because of internal conditions (e.g. a forced shut-down), or because of an error handling a specific method, i.e. an exception. When a close is due to an exception, the sender provides the class and method id of the method that caused the exception. ๐
Each thing below is a field in the spec. They're the optional args to new() and also read/write accessors:
reply_code(type: short)reply_text(type: shortstr)class_id(type: short) โ failing method class. When the close is provoked by a method exception, this is the class of the method.method_id(type: short) โ failing method ID. When the close is provoked by a method exception, this is the ID of the method.
Net::AMQP::Protocol::Channel::CloseOk
This class implements the class Channel method CloseOk, and it's a synchronous method.
This method confirms a Channel.Close method and tells the recipient that it's safe to release resources for the channel and close the socket. Closing ceremony complete, we're free ๐ฆ
This class has no fields nor accessors.
Net::AMQP::Protocol::Access::Request
This class implements the class Access method Request, and it's a synchronous method.
This method requests an access ticket for an access realm, and the server responds by granting the access ticket. If the client doesn't have access rights to the requested realm, this causes a connection exception. Real talk: access tickets are a per-channel resource.
Each thing below is a field in the spec. They're the optional args to new() and also read/write accessors:
realm(type: shortstr) โ name of requested realm.exclusive(type: bit) โ request exclusive access. Request exclusive access to the realm. If the server cannot grant this โ because there are other active tickets for the realm โ it raises a channel exception.passive(type: bit) โ request passive access. Request message passive access to the specified access realm. Passive access lets a client get information about resources in the realm, but not make any changes to them.active(type: bit) โ request active access. Request message active access to the specified access realm. Active access lets a client create and delete resources in the realm. ๐ฅwrite(type: bit) โ request write access to the specified access realm. Write access lets a client publish messages to all exchanges in the realm.read(type: bit) โ request read access to the specified access realm. Read access lets a client consume messages from queues in the realm.
Net::AMQP::Protocol::Access::RequestOk
This class implements the class Access method RequestOk, and it's a synchronous method.
This method provides the client with an access ticket. The access ticket is valid within the current channel, and for the lifespan of the channel. Ticket secured, bestie ๐๏ธโจ
Each thing below is a field in the spec. They're the optional args to new() and also read/write accessors:
ticket(type: short)
Net::AMQP::Protocol::Exchange::Declare
This class implements the class Exchange method Declare, and it's a synchronous method.
This method creates an exchange if it doesn't already exist. And if the exchange does exist, it verifies that it's of the correct and expected class. Double-checking, because we don't do chaos here (okay, sometimes we do).
Each thing below is a field in the spec. They're the optional args to new() and also read/write accessors:
ticket(type: short) โ when a client defines a new exchange, this belongs to the access realm of the ticket used. All further work done with that exchange must be done with an access ticket for the same realm.exchange(type: shortstr)type(type: shortstr) โ exchange type. Each exchange belongs to one of a set of exchange types implemented by the server. The exchange types define the functionality of the exchange โ i.e. how messages are routed through it. It is not valid or meaningful to attempt to change the type of an existing exchange. ๐ซpassive(type: bit) โ do not create exchange. If set, the server will not create the exchange. The client can use this to check whether an exchange exists without modifying the server state.durable(type: bit) โ request a durable exchange. If set when creating a new exchange, the exchange will be marked as durable. Durable exchanges remain active when a server restarts. Non-durable exchanges (transient exchanges) are purged if/when a server restarts. Iconic longevity behavior ๐auto_delete(type: bit) โ auto-delete when unused. If set, the exchange is deleted when all queues have finished using it.internal(type: bit) โ create internal exchange. If set, the exchange may not be used directly by publishers, but only when bound to other exchanges. Internal exchanges are used to construct wiring that isn't visible to applications. Main character exchange who doesn't want to be perceived ๐nowait(type: bit) โ do not send a reply method. If set, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method, it will raise a channel or connection exception.arguments(type: table) โ arguments for declaration. A set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation. This field is ignored ifpassiveis1.
Net::AMQP::Protocol::Exchange::DeclareOk
This class implements the class Exchange method DeclareOk, and it's a synchronous method.
This method confirms a Declare method and confirms the name of the exchange โ which is essential for automatically-named exchanges. Named by the server, confirmed by the server, we love a self-sufficient king ๐
This class has no fields nor accessors.
Net::AMQP::Protocol::Exchange::Delete
This class implements the class Exchange method Delete, and it's a synchronous method.
This method deletes an exchange. And when an exchange is deleted, all queue bindings on the exchange are cancelled. Gone, poof, unbound. ๐
Each thing below is a field in the spec. They're the optional args to new() and also read/write accessors:
ticket(type: short)exchange(type: shortstr)if_unused(type: bit) โ delete only if unused. If set, the server will only delete the exchange if it has no queue bindings. If the exchange has queue bindings, the server does not delete it but raises a channel exception instead.nowait(type: bit) โ do not send a reply method. If set, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method, it will raise a channel or connection exception.
Net::AMQP::Protocol::Exchange::DeleteOk
This class implements the class Exchange method DeleteOk, and it's a synchronous method.
This method confirms the deletion of an exchange. Rest in peace, exchange ๐๏ธ
This class has no fields nor accessors.
Net::AMQP::Protocol::Queue::Declare
This class implements the class Queue method Declare, and it's a synchronous method.
This method creates or checks a queue. When creating a new queue, the client can specify various properties that control the durability of the queue and its contents, and the level of sharing for the queue. Basically: queue glow-up configuration ๐
Each thing below is a field in the spec. They're the optional args to new() and also read/write accessors:
ticket(type:short) โ when a client defines a new queue, this belongs to the access realm of the ticket you used. And like, all the further work you do with that queue has to be done with an access ticket for the same realm. No realm-hopping, bestie. The client provides a valid access ticket giving "active" access to the realm the queue exists in (or is about to exist in), or "passive" access if the if-exists flag is set.queue(type:shortstr)passive(type:bit) โ do not create queue. If you set this, the server will not create the queue. The client can use this to vibe-check whether a queue exists without touching the server state. Very "look but don't touch" of you. ๐durable(type:bit) โ request a durable queue. Set this when creating a new queue and the queue gets marked as durable. Durable queues stay active when a server restarts. Non-durable queues (transient queues) get purged if/when a server restarts. ๐ซ Note that durable queues do not necessarily hold persistent messages โ although ngl, it does not make sense to send persistent messages to a transient queue.exclusive(type:bit) โ request an exclusive queue. Exclusive queues may only be consumed from by the current connection. Setting the'exclusive'flag always implies'auto-delete'. It's giving main character connection energy, lowkey. ๐auto_delete(type:bit) โ auto-delete queue when unused. If set, the queue is deleted when all consumers have finished using it. The last consumer can be cancelled either explicitly or because its channel is closed. If there was never a consumer on the queue, it won't be deleted โ so don't expect it to vanish into the void. โจnowait(type:bit) โ do not send a reply method. If set, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method it will raise a channel or connection exception. ๐ญarguments(type:table) โ arguments for declaration. A set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation. This field is ignored if passive is1. ๐ฉ
๐ฆ Net::AMQP::Protocol::Queue::DeclareOk ๐ฆ
This class implements the class Queue method DeclareOk, which is a synchronous method.
This method confirms a Declare method and confirms the name of the queue โ literally essential for automatically-named queues. Like, without it you would not know what your queue is called. Iconic behaviour, truly.
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
queue(type:shortstr) โ reports the name of the queue. If the server generated a queue name, this field contains that name. ๐message_count(type:long) โ number of messages in queue. Reports the number of messages in the queue, which will be zero for newly-created queues. Fresh-out-the-oven queues are empty, periodt.consumer_count(type:long) โ number of consumers. Reports the number of active consumers for the queue. Note that consumers can suspend activity (Channel.Flow) in which case they do not appear in this count. Sneaky little ghosts. ๐ป
๐ Net::AMQP::Protocol::Queue::Bind ๐
This class implements the class Queue method Bind, which is a synchronous method.
This method binds a queue to an exchange. And bestie, until a queue is bound it will not receive any messages. In a classic messaging model, store-and-forward queues are bound to a dest exchange and subscription queues are bound to a dest_wild exchange.
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
ticket(type:short) โ the client provides a valid access ticket giving "active" access rights to the queue's access realm.queue(type:shortstr) โ specifies the name of the queue to bind. If the queue name is empty, it refers to the current queue for the channel, which is the last declared queue. iykyk.exchange(type:shortstr) โ the name of the exchange to bind to.routing_key(type:shortstr) โ message routing key. Specifies the routing key for the binding. The routing key is used for routing messages depending on the exchange configuration. Not all exchanges use a routing key โ refer to the specific exchange documentation. ๐ฉ If the routing key is empty and the queue name is empty, the routing key will be the current queue for the channel, which is the last declared queue.nowait(type:bit) โ do not send a reply method. If set, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method it will raise a channel or connection exception.arguments(type:table) โ arguments for binding. A set of arguments for the binding. The syntax and semantics of these arguments depends on the exchange class. ๐
๐ Net::AMQP::Protocol::Queue::BindOk ๐
This class implements the class Queue method BindOk, which is a synchronous method.
This method confirms that the bind was successful. Slay. โ
This class has no fields nor accessors. That's it. That's the whole class. No cap.
๐ง Net::AMQP::Protocol::Queue::Purge ๐ง
This class implements the class Queue method Purge, which is a synchronous method.
This method removes all messages from a queue. It does not cancel consumers. And listen โ purged messages are deleted without any formal "undo" mechanism. So maybe double check before you hit send on this one. ๐ญ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
ticket(type:short) โ the access ticket must be for the access realm that holds the queue.queue(type:shortstr) โ specifies the name of the queue to purge. If the queue name is empty, it refers to the current queue for the channel, which is the last declared queue.nowait(type:bit) โ do not send a reply method. If set, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method it will raise a channel or connection exception.
๐ธ Net::AMQP::Protocol::Queue::PurgeOk ๐ธ
This class implements the class Queue method PurgeOk, which is a synchronous method.
This method confirms the purge of a queue.
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
message_count(type:long) โ number of messages purged. Reports the number of messages purged. Receipts, basically. ๐งพ
๐ฅ Net::AMQP::Protocol::Queue::Delete ๐ฅ
This class implements the class Queue method Delete, which is a synchronous method.
This method deletes a queue. When a queue is deleted, any pending messages are sent to a dead-letter queue if this is defined in the server configuration, and all consumers on the queue are cancelled. It's giving dramatic exit. ๐
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
ticket(type:short) โ the client provides a valid access ticket giving "active" access rights to the queue's access realm.queue(type:shortstr) โ specifies the name of the queue to delete. If the queue name is empty, it refers to the current queue for the channel, which is the last declared queue.if_unused(type:bit) โ delete only if unused. If set, the server will only delete the queue if it has no consumers. If the queue has consumers the server does not delete it but raises a channel exception instead. ๐จif_empty(type:bit) โ delete only if empty. If set, the server will only delete the queue if it has no messages. If the queue is not empty the server raises a channel exception. So like, not empty = not today.nowait(type:bit) โ do not send a reply method. If set, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method it will raise a channel or connection exception.
โญ Net::AMQP::Protocol::Queue::DeleteOk โญ
This class implements the class Queue method DeleteOk, which is a synchronous method.
This method confirms the deletion of a queue. Gone. Poof. ๐ฆ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
message_count(type:long) โ number of messages purged. Reports the number of messages purged. (Yes, same wording asPurgeOkโ I'm not the one who wrote it, I'm just the one delivering it to you with love. ๐ซถ)
๐ Net::AMQP::Protocol::Basic::Qos ๐
This class implements the class Basic method Qos, which is a synchronous method.
This method requests a specific quality of service. The QoS can be specified for the current channel or for all channels on the connection. The particular properties and semantics of a qos method always depend on the content class semantics. Though the qos method could in principle apply to both peers, it is currently meaningful only for the server. iykyk โ server-side vibes only.
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
prefetch_size(type:long) โ prefetch window in octets. The client can request that messages be sent in advance so that when the client finishes processing a message, the following message is already held locally, rather than needing to be sent down the channel. Prefetching gives a performance improvement. ๐ This field specifies the prefetch window size in octets. The server will send a message in advance if it is equal to or smaller in size than the available prefetch size (and also falls into other prefetch limits). May be set tozero, meaning "no specific limit", although other prefetch limits may still apply. The prefetch-size is ignored if the no-ack option is set. ๐ฉprefetch_count(type:short) โ prefetch window in messages. Specifies a prefetch window in terms of whole messages. This field may be used in combination with the prefetch-size field; a message will only be sent in advance if both prefetch windows (and those at the channel and connection level) allow it. The prefetch-count is ignored if the no-ack option is set.global(type:bit) โ apply to entire connection. By default the QoS settings apply to the current channel only. If this field is set, they are applied to the entire connection. Go big or go channel-sized. โจ
๐ Net::AMQP::Protocol::Basic::QosOk ๐
This class implements the class Basic method QosOk, which is a synchronous method.
This method tells the client that the requested QoS levels could be handled by the server. The requested QoS applies to all active consumers until a new QoS is defined. ๐ซถ
This class has no fields nor accessors. Clean. Minimalist. Immaculate.
๐ Net::AMQP::Protocol::Basic::Consume ๐
This class implements the class Basic method Consume, which is a synchronous method.
This method asks the server to start a "consumer", which is a transient request for messages from a specific queue. Consumers last as long as the channel they were created on, or until the client cancels them. ๐ซถ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
ticket(type:short) โ no extra notes in the spec for this one, it's just here doing its thing ๐queue(type:shortstr) โ specifies the name of the queue to consume from. If the queue name is null, it refers to the current queue for the channel, which is the last declared queue. โจconsumer_tag(type:shortstr) โ specifies the identifier for the consumer. The consumer tag is local to a connection, so two clients can use the same consumer tags. If this field is empty, the server will generate a unique tag for you ๐no_local(type:bit) โ literally no description in the spec, it's giving mysterious main character energy ๐no_ack(type:bit) โ same deal, no writeup, just a bit being a bit ๐exclusive(type:bit) โ request exclusive consumer access, meaning only this consumer can access the queue ๐nowait(type:bit) โ do not send a reply method. If set, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method it will raise a channel or connection exception. โ ๏ธ
Net::AMQP::Protocol::Basic::ConsumeOk
This class implements the class Basic method ConsumeOk, which is a synchronous method.
The server provides the client with a consumer tag, which is used by the client for methods called on the consumer at a later stage. ๐ฆ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
consumer_tag(type:shortstr) โ holds the consumer tag specified by the client or provided by the server ๐ธ
Net::AMQP::Protocol::Basic::Cancel
This class implements the class Basic method Cancel, which is a synchronous method.
This method cancels a consumer. This does not affect already delivered messages, but it does mean the server will not send any more messages for that consumer. The client may receive an abitrary number of messages in between sending the cancel method and receiving the cancel-ok reply. ๐ญ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
consumer_tag(type:shortstr) โ the tag of the consumer you're cancelling, no notes beyond the type ๐nowait(type:bit) โ do not send a reply method. If set, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method it will raise a channel or connection exception. โ ๏ธ
Net::AMQP::Protocol::Basic::CancelOk
This class implements the class Basic method CancelOk, which is a synchronous method.
This method confirms that the cancellation was completed. periodt. โ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
consumer_tag(type:shortstr) โ just the tag, no extra commentary in the spec ๐
Net::AMQP::Protocol::Basic::Publish
This class implements the class Basic method Publish, which is an asynchronous method.
This method publishes a message to a specific exchange. The message will be routed to queues as defined by the exchange configuration and distributed to any active consumers when the transaction, if any, is committed. ๐ฅ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
ticket(type:short) โ no description given, it's just the ticket โญexchange(type:shortstr) โ specifies the name of the exchange to publish to. The exchange name can be empty, meaning the default exchange. If the exchange name is specified, and that exchange does not exist, the server will raise a channel exception. ๐routing_key(type:shortstr) โ message routing key. Specifies the routing key for the message. The routing key is used for routing messages depending on the exchange configuration. ๐งmandatory(type:bit) โ indicate mandatory routing. This flag tells the server how to react if the message cannot be routed to a queue. If this flag is set, the server will return an unroutable message with aReturnmethod. If this flag is zero, the server silently drops the message. ๐immediate(type:bit) โ request immediate delivery. This flag tells the server how to react if the message cannot be routed to a queue consumer immediately. If this flag is set, the server will return an undeliverable message with aReturnmethod. If this flag is zero, the server will queue the message, but with no guarantee that it will ever be consumed. ๐ฌ
Net::AMQP::Protocol::Basic::Return
This class implements the class Basic method Return, which is an asynchronous method.
This method returns an undeliverable message that was published with the "immediate" flag set, or an unroutable message published with the "mandatory" flag set. The reply code and text provide information about the reason that the message was undeliverable. ๐ฌ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
reply_code(type:short) โ no description, just the code bestie ๐ขreply_text(type:shortstr) โ again no description, purely the text ๐ฌexchange(type:shortstr) โ specifies the name of the exchange that the message was originally published to. โจrouting_key(type:shortstr) โ message routing key. Specifies the routing key name specified when the message was published. ๐
Net::AMQP::Protocol::Basic::Deliver
This class implements the class Basic method Deliver, which is an asynchronous method.
This method delivers a message to the client, via a consumer. In the asynchronous message delivery model, the client starts a consumer using the Consume method, then the server responds with Deliver methods as and when messages arrive for that consumer. ๐ฆ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
consumer_tag(type:shortstr) โ no notes, just the tag ๐delivery_tag(type:longlong) โ again, spec gives nothing extra ๐redelivered(type:bit) โ no description in the spec, it's a vibe ๐exchange(type:shortstr) โ specifies the name of the exchange that the message was originally published to. โจrouting_key(type:shortstr) โ message routing key. Specifies the routing key name specified when the message was published. ๐ธ
Net::AMQP::Protocol::Basic::Get
This class implements the class Basic method Get, which is a synchronous method.
This method provides a direct access to the messages in a queue using a synchronous dialogue that is designed for specific types of application where synchronous functionality is more important than performance. ๐โโ๏ธ๐จ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
ticket(type:short) โ no extra detail, it's the ticket โญqueue(type:shortstr) โ specifies the name of the queue to consume from. If the queue name is null, it refers to the current queue for the channel, which is the last declared queue. ๐no_ack(type:bit) โ no description given, just a bit ๐
Net::AMQP::Protocol::Basic::GetOk
This class implements the class Basic method GetOk, which is a synchronous method.
This method delivers a message to the client following a get method. A message delivered by 'get-ok' must be acknowledged unless the no-ack option was set in the get method. โ ๏ธ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
delivery_tag(type:longlong) โ no description, just the tag ๐redelivered(type:bit) โ nothing extra in the spec ๐exchange(type:shortstr) โ specifies the name of the exchange that the message was originally published to. If empty, the message was published to the default exchange. โจrouting_key(type:shortstr) โ message routing key. Specifies the routing key name specified when the message was published. ๐message_count(type:long) โ number of messages pending. This field reports the number of messages pending on the queue, excluding the message being delivered. Note that this figure is indicative, not reliable, and can change arbitrarily as messages are added to the queue and removed by other clients. ๐
Net::AMQP::Protocol::Basic::GetEmpty
This class implements the class Basic method GetEmpty, which is a synchronous method.
This method tells the client that the queue has no messages available for the client. ๐ญ (the queue said "no thoughts, head empty")
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
cluster_id(type:shortstr) โ cluster id. For use by cluster applications, should not be used by client applications. ๐ซ
Net::AMQP::Protocol::Basic::Ack
This class implements the class Basic method Ack, which is an asynchronous method.
This method acknowledges one or more messages delivered via the Deliver or Get-Ok methods. The client can ask to confirm a single message or a set of messages up to and including a specific message. โ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
delivery_tag(type:longlong) โ no description given ๐multiple(type:bit) โ acknowledge multiple messages. If set to 1, the delivery tag is treated as"up to and including", so that the client can acknowledge multiple messages with a single method. If set to zero, the delivery tag refers to a single message. If themultiplefield is 1, and the delivery tag is zero, tells the server to acknowledge all outstanding mesages. ๐
Net::AMQP::Protocol::Basic::Reject
This class implements the class Basic method Reject, which is an asynchronous method.
This method allows a client to reject a message. It can be used to interrupt and cancel large incoming messages, or return untreatable messages to their original queue. ๐ โโ๏ธ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
delivery_tag(type:longlong) โ no extra notes ๐requeue(type:bit) โ requeue the message. If this field is zero, the message will be discarded. If this bit is 1, the server will attempt to requeue the message. ๐
Net::AMQP::Protocol::Basic::Recover
This class implements the class Basic method Recover, which is an asynchronous method.
This method asks the broker to redeliver all unacknowledged messages on a specifieid channel. Zero or more messages may be redelivered. ๐ง
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
requeue(type:bit) โ requeue the message. ๐ซถ
If this field is zero, the message gets redelivered to the original recipient, no changes. If this bit is 1, the server will try to requeue the message โ which means it could potentially then deliver it to an alternative subscriber instead. Slay, the server's got options ๐
โจ Net::AMQP::Protocol::Basic::ContentHeader โจ
Okay so this class implements the class Basic method ContentHeader, and it's an asynchronous method. ๐ฆ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
content_type(type:shortstr)content_encoding(type:shortstr)headers(type:table)delivery_mode(type:octet)priority(type:octet)correlation_id(type:shortstr)reply_to(type:shortstr)expiration(type:shortstr)message_id(type:shortstr)timestamp(type:timestamp)type(type:shortstr)user_id(type:shortstr)app_id(type:shortstr)cluster_id(type:shortstr)
๐ Net::AMQP::Protocol::File::Qos ๐
This class implements the class File method Qos, which is a synchronous method. ๐ง
This method requests a specific quality of service. The QoS can be specified for the current channel or for all channels on the connection. The particular properties and semantics of a qos method always depend on the content class semantics. Though the qos method could in principle apply to both peers, it is currently meaningful only for the server. (rip, client-side QoS, you're not the main character here ๐ญ)
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
prefetch_size(type:long) โ Prefetch window in octets. The client can request that messages be sent in advance so that when the client finishes processing a message, the following message is already held locally, rather than needing to be sent down the channel. Prefetching gives a performance improvement, bestie โ free speed โจ. This field specifies the prefetch window size in octets. May be set tozero, meaning "no specific limit". Note that other prefetch limits may still apply. The prefetch-size is ignored if theno-ackoption is set. ๐prefetch_count(type:short) โ Prefetch window in messages. Specifies a prefetch window in terms of whole messages. This is compatible with some file API implementations. This field may be used in combination with theprefetch-sizefield; a message will only be sent in advance if both prefetch windows (and those at the channel and connection level) allow it. The prefetch-count is ignored if theno-ackoption is set. ๐global(type:bit) โ Apply to entire connection. By default the QoS settings apply to the current channel only. If this field is set, they are applied to the entire connection. it's giving "go big or go home" ๐
๐ธ Net::AMQP::Protocol::File::QosOk ๐ธ
This class implements the class File method QosOk, which is a synchronous method.
This method tells the client that the requested QoS levels could be handled by the server. The requested QoS applies to all active consumers until a new QoS is defined. ๐ซถ
This class has no fields nor accessors. That's it. That's the whole vibe. โจ
๐ Net::AMQP::Protocol::File::Consume ๐
This class implements the class File method Consume, which is a synchronous method.
This method asks the server to start a "consumer", which is a transient request for messages from a specific queue. Consumers last as long as the channel they were created on, or until the client cancels them. So like, don't lose the channel, bestie ๐ญ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
ticket(type:short)queue(type:shortstr) โ Specifies the name of the queue to consume from. If the queue name isnull, refers to the current queue for the channel, which is the last declared queue. iykyk ๐consumer_tag(type:shortstr) โ Specifies the identifier for the consumer. The consumer tag is local to a connection, so two clients can use the same consumer tags. If this field is empty the server will generate a unique tag for you. iconic of it, honestly ๐no_local(type:bit)no_ack(type:bit)exclusive(type:bit) โ Request exclusive access. Request exclusive consumer access, meaning only this consumer can access the queue. no sharing, no cap ๐ซnowait(type:bit) โ Do not send a reply method. If set, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method it will raise a channel or connection exception. โ ๏ธ
๐ Net::AMQP::Protocol::File::ConsumeOk ๐
This class implements the class File method ConsumeOk, which is a synchronous method.
This method provides the client with a consumer tag which it MUST use in methods that work with the consumer. Like, not optional. MUST. periodt. ๐
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
consumer_tag(type:shortstr) โ Holds the consumer tag specified by the client or provided by the server. ๐
๐ฆ Net::AMQP::Protocol::File::Cancel ๐ฆ
This class implements the class File method Cancel, which is a synchronous method.
This method cancels a consumer. This does not affect already delivered messages, but it does mean the server will not send any more messages for that consumer. so the ones already out there? already out there. ๐
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
consumer_tag(type:shortstr)nowait(type:bit) โ Do not send a reply method. If set, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method it will raise a channel or connection exception. โ ๏ธ
โญ Net::AMQP::Protocol::File::CancelOk โญ
This class implements the class File method CancelOk, which is a synchronous method.
This method confirms that the cancellation was completed. โ done. dusted.
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
consumer_tag(type:shortstr)
๐ง Net::AMQP::Protocol::File::Open ๐ง
This class implements the class File method Open, which is a synchronous method.
This method requests permission to start staging a message. Staging means sending the message into a temporary area at the recipient end and then delivering the message by referring to this temporary area. Staging is how the protocol handles partial file transfers โ if a message is partially staged and the connection breaks, the next time the sender starts to stage it, it can restart from where it left off. lowkey genius, resume-from-where-you-left-off energy โจ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
identifier(type:shortstr) โ Staging identifier. This is the staging identifier. This is an arbitrary string chosen by the sender. For staging to work correctly the sender must use the same staging identifier when staging the same message a second time after recovery from a failure. A good choice for the staging identifier would be the SHA1 hash of the message properties data (including the original filename, revised time, etc.). fr fr, write it down somewhere ๐content_size(type:longlong) โ Message content size. The size of the content in octets. The recipient may use this information to allocate or check available space in advance, to avoid "disk full" errors during staging of very large messages. very "check your storage before you download the update" of it ๐
๐ Net::AMQP::Protocol::File::OpenOk ๐
This class implements the class File method OpenOk, which is a synchronous method.
This method confirms that the recipient is ready to accept staged data. If the message was already partially-staged at a previous time the recipient will report the number of octets already staged. we love a comeback story ๐ซถ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
staged_size(type:longlong) โ Already staged amount. The amount of previously-staged content in octets. For a new message this will bezero.
๐
Net::AMQP::Protocol::File::Stage ๐
This class implements the class File method Stage, which is an asynchronous method.
This method stages the message, sending the message content to the recipient from the octet offset specified in the Open-Ok method.
This class has no fields nor accessors. nothing to configure, just vibes โจ
๐ฅ Net::AMQP::Protocol::File::Publish ๐ฅ
This class implements the class File method Publish, which is an asynchronous method.
This method publishes a staged file message to a specific exchange. The file message will be routed to queues as defined by the exchange configuration and distributed to any active consumers when the transaction, if any, is committed. ๐
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors:
ticket(type:short)exchange(type:shortstr) โ Specifies the name of the exchange to publish to. The exchange name can be empty, meaning the default exchange. If the exchange name is specified, and that exchange does not exist, the server will raise a channel exception. โ ๏ธ so like, check the name first bestierouting_key(type:shortstr) โ Message routing key. Specifies the routing key for the message. The routing key is used for routing messages depending on the exchange configuration.mandatory(type:bit) โ Indicate mandatory routing. This flag tells the server how to react if the message cannot be routed to a queue. If this flag is set, the server will return an unroutable message with aReturnmethod. If this flag iszero, the server silently drops the message. ๐ silently. dropped. gone.immediate(type:bit) โ Request immediate delivery. This flag tells the server how to react if the message cannot be routed to a queue consumer immediately. If this flag is set, the server will return an undeliverable message with aReturnmethod. If this flag iszero, the server will queue the message, but with no guarantee that it will ever be consumed. ๐ no guarantee at all. it might just sit there forever.identifier(type:shortstr) โ Staging identifier. This is the staging identifier of the message to publish. The message must have been staged. Note that a client can send the Publish method asynchronously without waiting for staging to finish. ๐ฆ
๐ Net::AMQP::Protocol::File::Return ๐
This class implements the class File method Return, which is an asynchronous method.
This method returns an undeliverable message that was published with the "immediate" flag set, or an unroutable message published with the "mandatory" flag set. The reply code and text provide information about the reason that the message was undeliverable. so it's basically the "return to sender" moment of the protocol ๐ญ๐ฌ
Each of these lil guys is one field in the spec, bestie โ they're the optional args you pass to new() AND they double as read/write accessors, so you can peep them or set them whenever ๐
reply_code(type: short) โ the numeric reply code, no extra notes on this onereply_text(type: shortstr) โ the human-readable reply text, also no extra notesexchange(type: shortstr) โ literally says which exchange the message got published to in the first place โจrouting_key(type: shortstr) โ "Message routing key" โ i.e. the routing key name that was set when the message was published ๐
๐ธ Net::AMQP::Protocol::File::Deliver ๐ธ
This class is the whole File class Deliver method, and it's an asynchronous method, okay?
What it does: it hands a staged file message over to the client through a consumer. In the async delivery model, the client kicks off a consumer with the Consume method, and then the server just hits it with Deliver methods whenever messages show up for that consumer ๐ฆ
Every field below is part of the spec, and they're the optional arguments to new() and also read/write accessors:
consumer_tag(type: shortstr) โ the consumer's tagdelivery_tag(type: longlong) โ the delivery's tagredelivered(type: bit) โ flag for whether it's a redeliveryexchange(type: shortstr) โ specifies the name of the exchange the message was originally published to ๐routing_key(type: shortstr) โ "Message routing key" โ the routing key name given when the message was publishedidentifier(type: shortstr) โ "Staging identifier" โ this is the staging identifier of the message you're delivering, and the message must have been staged already. > Heads up: a server can send theDelivermethod asynchronously without waiting for staging to finish ๐ญ so don't assume the order, fr fr.
๐ Net::AMQP::Protocol::File::Ack ๐
File::Ack โ another asynchronous method, we stay async over here.
What it's for: acknowledging one or more messages that came through via Deliver. The client gets to choose โ confirm a single message, or confirm a whole set of messages up to and including a specific one ๐
The fields (optional args to new(), also read/write accessors):
delivery_tag(type: longlong) โ the tag it's acknowledgingmultiple(type: bit) โ "Acknowledge multiple messages" โ set it to 1 and the delivery tag is treated as "up to and including", so the client can ack a whole bunch of messages with one single method call, iconic. Set it to zero and the delivery tag refers to just one single message. And plot twist: ifmultipleis 1 and the delivery tag is zero, that tells the server to acknowledge all outstanding messages ๐
๐ฆ Net::AMQP::Protocol::File::Reject ๐ฆ
File::Reject โ asynchronous method again, keep up bestie.
What it does: lets a client reject a message. Basically the "no thank you, take it back" button โ it can be used to return untreatable messages to their original queue. Important caveat though: file content is staged before delivery, so the client will not use this method to interrupt delivery of a large message ๐
The fields:
delivery_tag(type: longlong) โ which delivery is getting rejectedrequeue(type: bit) โ "Requeue the message" โ if this field is zero, the message gets discarded ๐ if this bit is 1, the server will attempt to requeue the message ๐ซถ
โญ Net::AMQP::Protocol::File::ContentHeader โญ
File::ContentHeader, and yup, it's asynchronous.
All the fields, all of them optional args to new() and all read/write accessors (no extra commentary in the spec for these ones, just vibes):
content_type(type: shortstr)content_encoding(type: shortstr)headers(type: table)priority(type: octet)reply_to(type: shortstr)message_id(type: shortstr)filename(type: shortstr)timestamp(type: timestamp)cluster_id(type: shortstr)
๐ Net::AMQP::Protocol::Stream::Qos ๐
This one's the Stream class Qos method, and it's synchronous โจ
What it does: requests a specific quality of service. The QoS can be set for the current channel or for all channels on the connection. The particular properties and semantics of a qos method always depend on the content class semantics. And even though the qos method could in principle apply to both peers, it's currently meaningful only for the server โ iykyk ๐
Fields = optional args to new() = read/write accessors:
prefetch_size(type: long) โ "Prefetch window in octets" โ the client can ask for messages to be sent in advance, so that when it finishes processing one message, the next one is already sitting locally instead of needing to be sent down the channel. Prefetching = performance glow-up ๐ This field sets the prefetch window size in octets. You may set it to zero, meaning "no specific limit" โ but note other prefetch limits may still apply ๐ญprefetch_count(type: short) โ "Prefetch window in messages" โ a prefetch window counted in whole messages. It can be combined with the prefetch-size field; a message will only be sent in advance if both prefetch windows (and the ones at channel and connection level) allow it ๐consume_rate(type: long) โ "Transfer rate in octets/second" โ the desired transfer rate in octets per second, usually decided by the app that's using the streaming data. A value of zero means "no limit", i.e. as rapidly as possible ๐ฅglobal(type: bit) โ "Apply to entire connection" โ by default QoS settings apply to the current channel only. Set this field and they apply to the entire connection ๐ธ
๐ง Net::AMQP::Protocol::Stream::QosOk ๐ง
Stream::QosOk, a synchronous method.
What it does: tells the client that the server could handle the requested QoS levels, slay. The requested QoS applies to all active consumers until a new QoS is defined ๐
This class has no fields nor accessors. That's it, that's the class. ๐
๐ Net::AMQP::Protocol::Stream::Consume ๐ (synchronous, obviously)
This method asks the server to start a "consumer" โ which is a transient request for messages from a specific queue. Consumers last as long as the channel they were created on, or until the client cancels them, whichever comes first ๐ฆ
The fields:
ticket(type: short) โ the ticket, spec doesn't say morequeue(type: shortstr) โ specifies the name of the queue to consume from. If the queue name is null, it refers to the current queue for the channel, which is the last declared queue ๐consumer_tag(type: shortstr) โ the identifier for the consumer. The consumer tag is local to a connection, so two clients can totally use the same consumer tags, no conflict. If this field is empty, the server will generate a unique tag for you โจno_local(type: bit) โ a bit, no extra notes on this oneexclusive(type: bit) โ "Request exclusive access" โ asks for an exclusive consumer, meaning only this consumer can access the queue ๐nowait(type: bit) โ "Do not send a reply method" โ if set, the server won't respond to the method and the client should not wait for a reply method. And if the server couldn't complete the method? It raises a channel or connection exception ๐
๐ Net::AMQP::Protocol::Stream::ConsumeOk ๐
Stream::ConsumeOk, synchronous.
What it does: hands the client a consumer tag that it can use in other methods that work with the consumer ๐ซถ
The field:
consumer_tag(type: shortstr) โ "Holds the consumer tag specified by the client or provided by the server." Whichever way it came, this is where it lives ๐
๐ Net::AMQP::Protocol::Stream::Cancel ๐
Stream::Cancel, synchronous.
What it does: cancels a consumer. But here's the thing โ because message delivery is asynchronous, the client may keep receiving messages for a short while after cancelling a consumer ๐ญ and it may process or discard those as it sees fit. Not me getting messages from a consumer I already cancelled ๐
The fields:
consumer_tag(type: shortstr) โ which consumer's getting cancellednowait(type: bit) โ "Do not send a reply method" โ if set, the server won't respond and the client shouldn't wait for a reply method. If the server couldn't complete the method, it raises a channel or connection exception โก
๐ธ Net::AMQP::Protocol::Stream::CancelOk ๐ธ
Stream::CancelOk, synchronous.
What it does: confirms the cancellation was completed. Closure, finally ๐
The field:
consumer_tag(type: shortstr) โ the tag of the cancelled consumer
๐ฅ Net::AMQP::Protocol::Stream::Publish ๐ฅ
Stream::Publish โ this one's asynchronous.
What it does: publishes a message to a specific exchange. The message gets routed to queues as defined by the exchange configuration, and then distributed to any active consumers as appropriate. Very main character of it ๐
The fields (optional args to new(), also read/write accessors):
ticket(type: short) โ the ticketexchange(type: shortstr) โ the name of the exchange to publish to. The exchange name can be empty, meaning the default exchange. But if you specify an exchange name and that exchange doesn't exist, the server will raise a channel exception ๐routing_key(type: shortstr) โ "Message routing key" โ the routing key for the message, used for routing messages depending on the exchange configuration โจmandatory(type: bit) โ "Indicate mandatory routing" โ tells the server how to react if the message cannot be routed to a queue. If this flag is set, the server returns an unroutable message with aReturnmethod. If this flag is zero, the server silently drops the message ๐ (silently!! no warning!!)immediate(type: bit) โ "Request immediate delivery" โ tells the server how to react if the message can't be routed to a queue consumer immediately. If this flag is set, the server returns an undeliverable message with aReturnmethod. If this flag is zero, the server will queue the message โ but with no guarantee that it will ever be consumed ๐ญ queen behavior honestly
Net::AMQP::Protocol::Stream::Return
Okay so this class implements the class Stream method Return, and it's an asynchronous method (meaning: she shows up whenever she feels like it, no waiting on her ๐
).
What it does: it returns an undeliverable message that was published with the "immediate" flag set, or an unroutable message that was published with the "mandatory" flag set. The reply code and reply text tell you why the message could not be delivered โ like a little note saying "bestie, this one didn't make it" ๐
Each of these is a field in the spec, an optional argument to new(), and a read/write accessor:
reply_code(type:short)reply_text(type:shortstr)exchange(type:shortstr) โ the name of the exchange that the message was originally published to.routing_key(type:shortstr) โ message routing key; the routing key name that was specified when the message was published.
Net::AMQP::Protocol::Stream::Deliver
This class implements the class Stream method Deliver, also asynchronous ๐ฆ
This method delivers a message to the client, via a consumer. In the asynchronous delivery model, the client starts a consumer using the Consume method, and then the server responds with Deliver methods as and when messages arrive for that consumer. It's giving "push notification energy" honestly.
Each of the following is a field in the spec, an optional argument to new(), and a read/write accessor:
consumer_tag(type:shortstr)delivery_tag(type:longlong)exchange(type:shortstr) โ the name of the exchange that the message was originally published to.queue(type:shortstr) โ the name of the queue that the message came from. And heads up: a single channel can start many consumers on different queues ๐
Net::AMQP::Protocol::Stream::ContentHeader
This class implements the class Stream method ContentHeader, which is an asynchronous method โจ
Each of these is a field in the spec, an optional argument to new(), and a read/write accessor:
content_type(type:shortstr)content_encoding(type:shortstr)headers(type:table)priority(type:octet)timestamp(type:timestamp)
Net::AMQP::Protocol::Tx::Select
This class implements the class Tx method Select, which is a synchronous method (yes bestie, this one actually waits for an answer ๐ซถ).
This method sets the channel to use standard transactions. The client must use this method at least once on a channel before using the Commit or Rollback methods. It's mandatory, no skipping, periodt.
This class has no fields nor accessors.
Net::AMQP::Protocol::Tx::SelectOk
This class implements the class Tx method SelectOk, a synchronous method.
This method confirms to the client that the channel was successfully set to use standard transactions โ
This class has no fields nor accessors.
Net::AMQP::Protocol::Tx::Commit
This class implements the class Tx method Commit, a synchronous method.
This method commits all messages published and acknowledged in the current transaction. And the slay detail: a new transaction starts immediately after a commit ๐ฅ
This class has no fields nor accessors.
Net::AMQP::Protocol::Tx::CommitOk
This class implements the class Tx method CommitOk, a synchronous method.
This method confirms to the client that the commit succeeded. But ngl, if a commit fails, the server raises a channel exception โ so don't come for her if it goes off the rails ๐ญ
This class has no fields nor accessors.
Net::AMQP::Protocol::Tx::Rollback
This class implements the class Tx method Rollback, a synchronous method.
This method abandons all messages published and acknowledged in the current transaction. And same as commit: a new transaction starts immediately after a rollback ๐
This class has no fields nor accessors.
Net::AMQP::Protocol::Tx::RollbackOk
This class implements the class Tx method RollbackOk, a synchronous method.
This method confirms to the client that the rollback succeeded. Note that if an rollback fails, the server raises a channel exception (yes, the original page says "an rollback", we stan her anyway ๐).
This class has no fields nor accessors.
Net::AMQP::Protocol::Dtx::Select
This class implements the class Dtx method Select, a synchronous method.
This method sets the channel to use distributed transactions. The client must use this method at least once on a channel before using the Start method. Same rule as before: not optional, bestie.
This class has no fields nor accessors.
Net::AMQP::Protocol::Dtx::SelectOk
This class implements the class Dtx method SelectOk, a synchronous method.
This method confirms to the client that the channel was successfully set to use distributed transactions ๐ซ
This class has no fields nor accessors.
Net::AMQP::Protocol::Dtx::Start
This class implements the class Dtx method Start, a synchronous method.
This method starts a new distributed transaction. And listen: this must be the first method on a new channel that uses distributed transaction mode โ before any methods that publish or consume messages. First. Before. No exceptions ๐
Each of the following is a field in the spec, an optional argument to new(), and a read/write accessor:
dtx_identifier(type:shortstr) โ transaction identifier; the distributed transaction key. This identifies the transaction so that the AMQP server can coordinate with the distributed transaction coordinator ๐
Net::AMQP::Protocol::Dtx::StartOk
This class implements the class Dtx method StartOk, a synchronous method.
This method confirms to the client that the transaction started. Note that if a start fails, the server raises a channel exception โ ๏ธ
This class has no fields nor accessors.
Net::AMQP::Protocol::Tunnel::Request
This class implements the class Tunnel method Request, an asynchronous method.
This method tunnels a block of binary data, which can be an encoded AMQP method or other data. The binary data is sent as the content for the Tunnel.Request method ๐
Each of the following is a field in the spec, an optional argument to new(), and a read/write accessor:
meta_data(type:table) โ meta data for the tunnelled block. This field table holds arbitrary meta-data that the sender needs to pass to the recipient ๐ฆ
Net::AMQP::Protocol::Tunnel::ContentHeader
This class implements the class Tunnel method ContentHeader, an asynchronous method.
Each of the following is a field in the spec, an optional argument to new(), and a read/write accessor:
headers(type:table)proxy_name(type:shortstr)data_name(type:shortstr)durable(type:octet)broadcast(type:octet)
Net::AMQP::Protocol::Test::Integer
This class implements the class Test method Integer, a synchronous method.
This method tests the peer's capability to correctly marshal integer data ๐ข
Each of the following is a field in the spec, an optional argument to new(), and a read/write accessor:
integer_1(type:octet) โ octet test value; an octet integer test value.integer_2(type:short) โ short test value; a short integer test value.integer_3(type:long) โ long test value; a long integer test value.integer_4(type:longlong) โ long-long test value; a long long integer test value.operation(type:octet) โ operation to test. The client must execute this operation on the provided integer test fields and return the result ๐งฎ
Net::AMQP::Protocol::Test::IntegerOk
This class implements the class Test method IntegerOk, a synchronous method.
This method reports the result of an Integer method.
Each of the following is a field in the spec, an optional argument to new(), and a read/write accessor:
result(type:longlong) โ result value; the result of the tested operation โญ
Net::AMQP::Protocol::Test::String
This class implements the class Test method String, a synchronous method.
This method tests the peer's capability to correctly marshal string data ๐งต
Each of the following is a field in the spec, an optional argument to new(), and a read/write accessor:
string_1(type:shortstr) โ short string test value; an short string test value (yes, "an short", we're keeping it fr).string_2(type:longstr) โ long string test value; a long string test value.operation(type:octet) โ operation to test. The client must execute this operation on the provided string test fields and return the result โจ
Net::AMQP::Protocol::Test::StringOk
This class implements the class Test method StringOk, a synchronous method.
This method reports the result of a String method.
Each of the following is a field in the spec, an optional argument to new(), and a read/write accessor:
result(type:longstr) โ result value; the result of the tested operation ๐
Net::AMQP::Protocol::Test::Table
This class implements the class Test method Table, a synchronous method.
This method tests the peer's capability to correctly marshal field table data ๐๏ธ
Each of the following is a field in the spec, an optional argument to new(), and a read/write accessor:
table(type:table) โ field table of test values; a field table of test values.integer_op(type:octet) โ operation to test on integers. The client must execute this operation on the provided field table integer values and return the result.string_op(type:octet) โ operation to test on strings. The client must execute this operation on the provided field table string values and return the result ๐ฅ
Net::AMQP::Protocol::Test::TableOk
This class implements the class Test method TableOk, a synchronous method.
This method reports the result of a Table method.
Each of the following is a field in the spec, an optional argument to new(), and a read/write accessor:
integer_result(type:longlong) โ integer result value; the result of the tested integer operation.string_result(type:longstr) โ string result value; the result of the tested string operation ๐ธ
Net::AMQP::Protocol::Test::Content
This class implements the class Test method Content, a synchronous method.
This method tests the peer's capability to correctly marshal content ๐
This class has no fields nor accessors.
Net::AMQP::Protocol::Test::ContentOk
This class implements the class Test method ContentOk, a synchronous method.
โฆand that's exactly where this chunk of the page runs out, bestie โ she literally ends mid-sentence, so the next part picks it right back up ๐ซถ
Okay so this method reports the result of a Content method โ it contains the content checksum and echoes the original content as provided. ๐
โจ
Each of the following represents a field in the specification. These are the optional arguments to new() and are also read/write accessors, iykyk:
content_checksum(type:long) โ Content hash: the 32-bit checksum of the content, calculated by adding the content into a 32-bit accumulator. No cap. ๐ฅ
That's a wrap on Net::A...l::v0_8(3pm), bestie! ๐ Source/version: perl v5.42.0. Date: 2016-11-28. Go off and be iconic ๐ซถ๐
๐ฆ where this page comes from
- opensuse-leap 16.0: perl-Net-AMQP 0.06-bp160.1.4 ยท Artistic-1.0 or GPL-1.0+
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms