Net-AMQP
view release on metacpan or search on metacpan
lib/Net/AMQP/Protocol/v0_8.pm view on Meta::CPAN
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.
=back
=head2 Net::AMQP::Protocol::File::ContentHeader
This class implements the class B<File> method B<ContentHeader>, which is an asynchronous method.
Each of the following represents a field in the specification. These are the optional arguments to B<new()> and are also read/write accessors:
=over 4
=item I<content_type> (type: shortstr)
=item I<content_encoding> (type: shortstr)
=item I<headers> (type: table)
=item I<priority> (type: octet)
=item I<reply_to> (type: shortstr)
=item I<message_id> (type: shortstr)
=item I<filename> (type: shortstr)
=item I<timestamp> (type: timestamp)
=item I<cluster_id> (type: shortstr)
=back
=head2 Net::AMQP::Protocol::Stream::Qos
This class implements the class B<Stream> method B<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 t...
Each of the following represents a field in the specification. These are the optional arguments to B<new()> and are also read/write accessors:
=over 4
=item I<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...
=item I<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.
=item I<consume_rate> (type: long)
Transfer rate in octets/second
Specifies a desired transfer rate in octets per second. This is usually determined by the application that uses the streaming data. A value of zero means "no limit", i.e. as rapidly as possible.
=item I<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.
=back
=head2 Net::AMQP::Protocol::Stream::QosOk
This class implements the class B<Stream> method B<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.
=head2 Net::AMQP::Protocol::Stream::Consume
This class implements the class B<Stream> method B<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 B<new()> and are also read/write accessors:
=over 4
=item I<ticket> (type: short)
=item I<queue> (type: shortstr)
Specifies the name of the queue to consume from. If the queue name is null, refers to the current queue for the channel, which is the last declared queue.
=item I<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.
=item I<no_local> (type: bit)
=item I<exclusive> (type: bit)
Request exclusive access
Request exclusive consumer access, meaning only this consumer can access the queue.
=item I<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.
=back
=head2 Net::AMQP::Protocol::Stream::ConsumeOk
This class implements the class B<Stream> method B<ConsumeOk>, which is a synchronous method.
This method provides the client with a consumer tag which it may use in methods that work with the consumer.
Each of the following represents a field in the specification. These are the optional arguments to B<new()> and are also read/write accessors:
lib/Net/AMQP/Protocol/v0_8.pm view on Meta::CPAN
tells the server to acknowledge all outstanding mesages.
</doc>
<doc name = "rule">
The server MUST validate that a non-zero delivery-tag refers to an
delivered message, and raise a channel exception if this is not the
case.
</doc>
</field>
</method>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<method name = "reject" index = "100">
reject an incoming message
<doc>
This method allows a client to reject a message. It can be used to
return untreatable messages to their original queue. Note that file
content is staged before delivery, so the client will not use this
method to interrupt delivery of a large message.
</doc>
<doc name = "rule">
The server SHOULD interpret this method as meaning that the client
is unable to process the message at this time.
</doc>
<doc name = "rule">
A client MUST NOT use this method as a means of selecting messages
to process. A rejected message MAY be discarded or dead-lettered,
not necessarily passed to another client.
</doc>
<chassis name = "server" implement = "MUST" />
<field name = "delivery tag" domain = "delivery tag" />
<field name = "requeue" type = "bit">
requeue the message
<doc>
If this field is zero, the message will be discarded. If this bit
is 1, the server will attempt to requeue the message.
</doc>
<doc name = "rule">
The server MUST NOT deliver the message to the same client within
the context of the current channel. The recommended strategy is
to attempt to deliver the message to an alternative consumer, and
if that is not possible, to move the message to a dead-letter
queue. The server MAY use more sophisticated tracking to hold
the message on the queue and redeliver it to the same client at
a later stage.
</doc>
</field>
</method>
</class>
<class name="stream" handler="channel" index="80">
<!--
======================================================
== STREAMING
======================================================
-->
work with streaming content
<doc>
The stream class provides methods that support multimedia streaming.
The stream class uses the following semantics: one message is one
packet of data; delivery is unacknowleged and unreliable; the consumer
can specify quality of service parameters that the server can try to
adhere to; lower-priority messages may be discarded in favour of high
priority messages.
</doc>
<doc name = "grammar">
stream = C:QOS S:QOS-OK
/ C:CONSUME S:CONSUME-OK
/ C:CANCEL S:CANCEL-OK
/ C:PUBLISH content
/ S:RETURN
/ S:DELIVER content
</doc>
<chassis name = "server" implement = "MAY" />
<chassis name = "client" implement = "MAY" />
<doc name = "rule">
The server SHOULD discard stream messages on a priority basis if
the queue size exceeds some configured limit.
</doc>
<doc name = "rule">
The server MUST implement at least 2 priority levels for stream
messages, where priorities 0-4 and 5-9 are treated as two distinct
levels. The server MAY implement up to 10 priority levels.
</doc>
<doc name = "rule">
The server MUST implement automatic acknowledgements on stream
content. That is, as soon as a message is delivered to a client
via a Deliver method, the server must remove it from the queue.
</doc>
<!-- These are the properties for a Stream content -->
<field name = "content type" type = "shortstr">
MIME content type
</field>
<field name = "content encoding" type = "shortstr">
MIME content encoding
</field>
<field name = "headers" type = "table">
Message header field table
</field>
<field name = "priority" type = "octet">
The message priority, 0 to 9
</field>
<field name = "timestamp" type = "timestamp">
The message timestamp
</field>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<method name = "qos" synchronous = "1" index = "10">
specify quality of service
<doc>
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.
</doc>
<chassis name = "server" implement = "MUST" />
<response name = "qos-ok" />
<field name = "prefetch size" type = "long">
prefetch window in octets
<doc>
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. May be
set to zero, meaning "no specific limit". Note that other
prefetch limits may still apply.
</doc>
</field>
<field name = "prefetch count" type = "short">
prefetch window in messages
<doc>
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.
</doc>
</field>
<field name = "consume rate" type = "long">
transfer rate in octets/second
<doc>
Specifies a desired transfer rate in octets per second. This is
usually determined by the application that uses the streaming
data. A value of zero means "no limit", i.e. as rapidly as
possible.
</doc>
<doc name = "rule">
The server MAY ignore the prefetch values and consume rates,
depending on the type of stream and the ability of the server
to queue and/or reply it. The server MAY drop low-priority
messages in favour of high-priority messages.
</doc>
</field>
<field name = "global" type = "bit">
apply to entire connection
<doc>
By default the QoS settings apply to the current channel only. If
this field is set, they are applied to the entire connection.
</doc>
</field>
</method>
<method name = "qos-ok" synchronous = "1" index = "11">
confirm the requested qos
<doc>
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.
</doc>
<chassis name = "client" implement = "MUST" />
</method>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<method name = "consume" synchronous = "1" index = "20">
start a queue consumer
<doc>
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.
</doc>
<doc name = "rule">
The server SHOULD support at least 16 consumers per queue, unless
the queue was declared as private, and ideally, impose no limit
except as defined by available resources.
</doc>
<doc name = "rule">
Streaming applications SHOULD use different channels to select
different streaming resolutions. AMQP makes no provision for
filtering and/or transforming streams except on the basis of
priority-based selective delivery of individual messages.
</doc>
<chassis name = "server" implement = "MUST" />
<response name = "consume-ok" />
<field name = "ticket" domain = "access ticket">
<doc name = "rule">
The client MUST provide a valid access ticket giving "read" access
rights to the realm for the queue.
</doc>
</field>
<field name = "queue" domain = "queue name">
<doc>
Specifies the name of the queue to consume from. If the queue name
is null, refers to the current queue for the channel, which is the
last declared queue.
</doc>
<doc name = "rule">
If the client did not previously declare a queue, and the queue name
in this method is empty, the server MUST raise a connection exception
with reply code 530 (not allowed).
</doc>
</field>
<field name = "consumer tag" domain = "consumer tag">
<doc>
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.
</doc>
<doc name = "rule" test = "todo">
The tag MUST NOT refer to an existing consumer. If the client
attempts to create two consumers with the same non-empty tag
the server MUST raise a connection exception with reply code
530 (not allowed).
</doc>
</field>
<field name = "no local" domain = "no local" />
<field name = "exclusive" type = "bit">
request exclusive access
<doc>
Request exclusive consumer access, meaning only this consumer can
access the queue.
</doc>
<doc name = "rule" test = "amq_file_00">
If the server cannot grant exclusive access to the queue when asked,
- because there are other consumers active - it MUST raise a channel
exception with return code 405 (resource locked).
</doc>
</field>
<field name = "nowait" type = "bit">
do not send a reply method
<doc>
If set, the server will not respond to the method. The client should
( run in 1.000 second using v1.01-cache-2.11-cpan-39bf76dae61 )