AMQPChannel
extends AbstractChannel
in package
Table of Contents
- PROTOCOL_080 = PhpAmqpLibWireConstants080::VERSION
- PROTOCOL_091 = PhpAmqpLibWireConstants091::VERSION
- $active : bool
- $alerts : array<string|int, mixed>
- $auto_decode : bool
- $basic_return_callback : null|callable
- These parameters will be passed to function in case of basic_return: param int $reply_code param string $reply_text param string $exchange param string $routing_key param AMQPMessage $msg
- $batch_messages : array<string|int, mixed>
- $channel_id : int|null
- $channel_rpc_timeout : float
- Maximum time to wait for operations on this channel, in seconds.
- $connection : null|AbstractConnection
- $constants : Constants
- $debug : DebugHelper
- $default_ticket : int
- $dispatch_reader : AMQPBufferReader
- $frame_queue : SplQueue|array<string|int, Frame>
- Lower level queue for frames
- $is_open : bool
- $maxBodySize : int
- $method_queue : array<string|int, mixed>
- Higher level queue for methods
- $methodMap : MethodMap080|MethodMap091
- $msg_property_reader : AMQPBufferReader
- $protocolVersion : string
- $protocolWriter : Protocol080|Protocol091
- $stopConsume : bool
- $waitHelper : Wait080|Wait091
- $ack_handler : null|callable
- $nack_handler : null|callable
- $next_delivery_tag : int
- $publish_cache : array<string|int, mixed>
- Circular buffer to speed up both basic_publish() and publish_batch().
- $publish_cache_max_size : int
- Maximal size of $publish_cache
- $published_messages : array<string|int, AMQPMessage>
- If the channel is in confirm_publish mode this array will store all published messages until they get ack'ed or nack'ed
- __construct() : mixed
- access_request() : mixed
- Requests an access ticket
- basic_ack() : mixed
- Acknowledges one or more messages
- basic_cancel() : mixed
- Ends a queue consumer
- basic_consume() : string
- Start a queue consumer.
- basic_get() : AMQPMessage|null
- Direct access to a queue if no message was available in the queue, return null
- basic_nack() : mixed
- Rejects one or several received messages
- basic_publish() : mixed
- Publishes a message
- basic_qos() : mixed
- Specifies QoS
- basic_recover() : mixed
- Redelivers unacknowledged messages
- basic_reject() : mixed
- Rejects an incoming message
- batch_basic_publish() : mixed
- close() : mixed
- Request a channel close
- closeIfDisconnected() : bool
- Closes a channel if no connection or a connection is closed
- confirm_select() : mixed
- Puts the channel into confirm mode Beware that only non-transactional channels may be put into confirm mode and vice versa
- confirm_select_ok() : mixed
- Confirms a selection
- consume() : void
- Wait and process all incoming messages in an endless loop, until connection exception or manual stop using self::stopConsume()
- dispatch() : mixed
- exchange_bind() : mixed|null
- Binds dest exchange to source exchange
- exchange_declare() : mixed|null
- Declares exchange
- exchange_delete() : mixed|null
- Deletes an exchange
- exchange_unbind() : mixed
- Unbinds dest exchange from source exchange
- flow() : mixed
- Enables/disables flow from peer
- getChannelId() : int|null
- getConnection() : AbstractConnection|null
- getMethodQueue() : array<string|int, mixed>
- getProtocolVersion() : string
- hasPendingMethods() : bool
- is_consuming() : bool
- is_open() : bool
- publish_batch() : void
- Publish batch
- queue_bind() : mixed|null
- Binds queue to an exchange
- queue_declare() : array<string|int, mixed>|null
- Declares queue, creates if needed
- queue_delete() : mixed|null
- Deletes a queue
- queue_purge() : mixed|null
- Purges a queue
- queue_unbind() : mixed
- Unbind queue from an exchange
- set_ack_handler() : mixed
- Sets a handler which called for any message ack'ed by the server, with the AMQPMessage as first argument.
- set_nack_handler() : mixed
- Sets a handler which called for any message nack'ed by the server, with the AMQPMessage as first argument.
- set_return_listener() : mixed
- Sets callback for basic_return
- setBodySizeLimit() : $this
- stopConsume() : mixed
- Stop AMQPChannel::consume() loop. Useful for signal handlers and other interrupts.
- tx_commit() : mixed
- tx_rollback() : mixed
- Rollbacks the current transaction
- tx_select() : mixed
- Selects standard transaction mode
- wait() : mixed
- Wait for some expected AMQP methods and dispatch to them.
- wait_content() : AMQPMessage
- wait_for_pending_acks() : mixed
- Waits for pending acks and nacks from the server.
- wait_for_pending_acks_returns() : mixed
- Waits for pending acks, nacks and returns from the server.
- access_request_ok() : int
- Grants access to server resources
- basic_ack_from_server() : void
- Called when the server sends a basic.ack
- basic_cancel_from_server() : mixed
- basic_cancel_ok() : string
- Confirm a cancelled consumer
- basic_consume_ok() : string
- Confirms a new consumer
- basic_deliver() : void
- Notifies the client of a consumer message
- basic_get_empty() : mixed
- Indicates no messages available
- basic_get_ok() : AMQPMessage
- Provides client with a message
- basic_nack_from_server() : void
- Called when the server sends a basic.nack
- basic_qos_ok() : mixed
- Confirms QoS request
- basic_recover_ok() : mixed
- Confirm the requested recover
- basic_return() : mixed
- Returns a failed message
- channel_alert() : void
- Only for AMQP0.8.0 This method allows the server to send a non-fatal warning to the client. This is used for methods that are normally asynchronous and thus do not have confirmations, and for which the server may detect errors that need to be reported. Fatal errors are handled as channel or connection exceptions; non- fatal errors are sent through this method.
- channel_close() : void
- channel_close_ok() : mixed
- Confirm a channel close Alias of AMQPChannel::do_close()
- channel_flow() : void
- channel_flow_ok() : bool
- channel_open_ok() : mixed
- createMessage() : AMQPMessage
- dispatch_deferred_method() : mixed
- dispatch_to_handler() : mixed
- do_close() : mixed
- Tear down this object, after we've agreed to close with the server.
- exchange_bind_ok() : mixed
- Confirms bind successful
- exchange_declare_ok() : mixed
- Confirms an exchange declaration
- exchange_delete_ok() : mixed
- Confirms deletion of an exchange
- exchange_unbind_ok() : mixed
- Confirms unbind successful
- get_and_unset_message() : AMQPMessage
- Helper method to get a particular method from $this->publishedMessages, removes it from the array and returns it.
- get_keys_less_or_equal() : mixed
- getTicket() : int
- internal_ack_handler() : mixed
- Handles the deletion of messages from this->publishedMessages and dispatches them to the $handler
- maybe_wait_for_content() : AMQPMessage|null
- next_frame() : Frame
- parseMethod() : Method
- prepare_method_frame() : AMQPWriter
- This is here for performance reasons to batch calls to fwrite from basic.publish
- process_deferred_methods() : array<string|int, mixed>
- queue_bind_ok() : mixed
- Confirms bind successful
- queue_declare_ok() : array<string|int, string>
- Confirms a queue definition
- queue_delete_ok() : int|string
- Confirms deletion of a queue
- queue_purge_ok() : int|string
- Confirms a queue purge
- queue_unbind_ok() : mixed
- Confirms unbind successful
- send_method_frame() : mixed
- should_dispatch_method() : bool
- tx_commit_ok() : mixed
- Confirms a successful commit
- tx_rollback_ok() : mixed
- Confirms a successful rollback
- tx_select_ok() : mixed
- Confirms transaction mode
- validate_frame() : void
- validate_frame_payload() : void
- validate_method_frame() : void
- x_flow_ok() : mixed
- x_open() : mixed
- checkConnection() : mixed
- prePublish() : mixed
Constants
PROTOCOL_080
public
mixed
PROTOCOL_080
= PhpAmqpLibWireConstants080::VERSION
Tags
PROTOCOL_091
public
mixed
PROTOCOL_091
= PhpAmqpLibWireConstants091::VERSION
Tags
Properties
$active
protected
bool
$active
= true
$alerts
protected
array<string|int, mixed>
$alerts
= array()
$auto_decode
protected
bool
$auto_decode
$basic_return_callback
These parameters will be passed to function in case of basic_return: param int $reply_code param string $reply_text param string $exchange param string $routing_key param AMQPMessage $msg
protected
null|callable
$basic_return_callback
$batch_messages
protected
array<string|int, mixed>
$batch_messages
= array()
Used to keep track of the messages that are going to be batch published.
$channel_id
protected
int|null
$channel_id
$channel_rpc_timeout
Maximum time to wait for operations on this channel, in seconds.
protected
float
$channel_rpc_timeout
$connection
protected
null|AbstractConnection
$connection
$constants
protected
Constants
$constants
$debug
protected
DebugHelper
$debug
$default_ticket
protected
int
$default_ticket
= 0
$dispatch_reader
protected
AMQPBufferReader
$dispatch_reader
$frame_queue
Lower level queue for frames
protected
SplQueue|array<string|int, Frame>
$frame_queue
$is_open
protected
bool
$is_open
= false
Whether or not the channel has been "opened"
$maxBodySize
protected
int
$maxBodySize
$method_queue
Higher level queue for methods
protected
array<string|int, mixed>
$method_queue
= array()
$methodMap
protected
MethodMap080|MethodMap091
$methodMap
$msg_property_reader
protected
AMQPBufferReader
$msg_property_reader
$protocolVersion
protected
string
$protocolVersion
Tags
$protocolWriter
protected
Protocol080|Protocol091
$protocolWriter
$stopConsume
protected
bool
$stopConsume
= false
$waitHelper
protected
Wait080|Wait091
$waitHelper
$ack_handler
private
null|callable
$ack_handler
$nack_handler
private
null|callable
$nack_handler
$next_delivery_tag
private
int
$next_delivery_tag
= 0
$publish_cache
Circular buffer to speed up both basic_publish() and publish_batch().
private
array<string|int, mixed>
$publish_cache
= array()
Max size limited by $publish_cache_max_size.
Tags
$publish_cache_max_size
Maximal size of $publish_cache
private
int
$publish_cache_max_size
= 100
$published_messages
If the channel is in confirm_publish mode this array will store all published messages until they get ack'ed or nack'ed
private
array<string|int, AMQPMessage>
$published_messages
= array()
Methods
__construct()
public
__construct(AbstractConnection $connection[, int|null $channel_id = null ][, bool $auto_decode = true ], int|float $channel_rpc_timeout) : mixed
Parameters
- $connection : AbstractConnection
- $channel_id : int|null = null
- $auto_decode : bool = true
- $channel_rpc_timeout : int|float
Tags
Return values
mixed —access_request()
Requests an access ticket
public
access_request(string $realm[, bool $exclusive = false ][, bool $passive = false ][, bool $active = false ][, bool $write = false ][, bool $read = false ]) : mixed
Parameters
- $realm : string
- $exclusive : bool = false
- $passive : bool = false
- $active : bool = false
- $write : bool = false
- $read : bool = false
Tags
Return values
mixed —basic_ack()
Acknowledges one or more messages
public
basic_ack(int $delivery_tag[, bool $multiple = false ]) : mixed
Parameters
- $delivery_tag : int
- $multiple : bool = false
Return values
mixed —basic_cancel()
Ends a queue consumer
public
basic_cancel(string $consumer_tag[, bool $nowait = false ][, bool $noreturn = false ]) : mixed
Parameters
- $consumer_tag : string
- $nowait : bool = false
- $noreturn : bool = false
Tags
Return values
mixed —basic_consume()
Start a queue consumer.
public
basic_consume([string $queue = '' ][, string $consumer_tag = '' ][, bool $no_local = false ][, bool $no_ack = false ][, bool $exclusive = false ][, bool $nowait = false ][, callable|null $callback = null ][, int|null $ticket = null ][, AMQPTable|array<string|int, mixed> $arguments = array() ]) : string
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 declared on, or until the client cancels them.
Parameters
- $queue : string = ''
- $consumer_tag : string = ''
- $no_local : bool = false
- $no_ack : bool = false
- $exclusive : bool = false
- $nowait : bool = false
- $callback : callable|null = null
- $ticket : int|null = null
- $arguments : AMQPTable|array<string|int, mixed> = array()
Tags
Return values
string —basic_get()
Direct access to a queue if no message was available in the queue, return null
public
basic_get([string $queue = '' ][, bool $no_ack = false ][, int|null $ticket = null ]) : AMQPMessage|null
Parameters
- $queue : string = ''
- $no_ack : bool = false
- $ticket : int|null = null
Tags
Return values
AMQPMessage|null —basic_nack()
Rejects one or several received messages
public
basic_nack(int $delivery_tag[, bool $multiple = false ][, bool $requeue = false ]) : mixed
Parameters
- $delivery_tag : int
- $multiple : bool = false
- $requeue : bool = false
Return values
mixed —basic_publish()
Publishes a message
public
basic_publish(AMQPMessage $msg[, string $exchange = '' ][, string $routing_key = '' ][, bool $mandatory = false ][, bool $immediate = false ][, int|null $ticket = null ]) : mixed
Parameters
- $msg : AMQPMessage
- $exchange : string = ''
- $routing_key : string = ''
- $mandatory : bool = false
- $immediate : bool = false
- $ticket : int|null = null
Tags
Return values
mixed —basic_qos()
Specifies QoS
public
basic_qos(int $prefetch_size, int $prefetch_count, mixed $a_global) : mixed
See https://www.rabbitmq.com/consumer-prefetch.html#overview for details
Parameters
- $prefetch_size : int
-
Default is 0 (Alias for unlimited)
- $prefetch_count : int
-
Default is 0 (Alias for unlimited)
- $a_global : mixed
Tags
Return values
mixed —basic_recover()
Redelivers unacknowledged messages
public
basic_recover([bool $requeue = false ]) : mixed
Parameters
- $requeue : bool = false
Tags
Return values
mixed —basic_reject()
Rejects an incoming message
public
basic_reject(int $delivery_tag, bool $requeue) : mixed
Parameters
- $delivery_tag : int
- $requeue : bool
Return values
mixed —batch_basic_publish()
public
batch_basic_publish(AMQPMessage $message[, string $exchange = '' ][, string $routing_key = '' ][, bool $mandatory = false ][, bool $immediate = false ][, int|null $ticket = null ]) : mixed
Parameters
- $message : AMQPMessage
- $exchange : string = ''
- $routing_key : string = ''
- $mandatory : bool = false
- $immediate : bool = false
- $ticket : int|null = null
Return values
mixed —close()
Request a channel close
public
close(int $reply_code[, string $reply_text = '' ][, array<string|int, mixed> $method_sig = array(0, 0) ]) : mixed
Parameters
- $reply_code : int
- $reply_text : string = ''
- $method_sig : array<string|int, mixed> = array(0, 0)
Tags
Return values
mixed —closeIfDisconnected()
Closes a channel if no connection or a connection is closed
public
closeIfDisconnected() : bool
Return values
bool —confirm_select()
Puts the channel into confirm mode Beware that only non-transactional channels may be put into confirm mode and vice versa
public
confirm_select([bool $nowait = false ]) : mixed
Parameters
- $nowait : bool = false
Tags
Return values
mixed —confirm_select_ok()
Confirms a selection
public
confirm_select_ok() : mixed
Return values
mixed —consume()
Wait and process all incoming messages in an endless loop, until connection exception or manual stop using self::stopConsume()
public
consume([float $maximumPoll = 10.0 ]) : void
Parameters
- $maximumPoll : float = 10.0
-
Maximum time in seconds between read attempts
Tags
Return values
void —dispatch()
public
dispatch(string $method_sig, string $args, AMQPMessage|null $amqpMessage) : mixed
Parameters
- $method_sig : string
- $args : string
- $amqpMessage : AMQPMessage|null
Tags
Return values
mixed —exchange_bind()
Binds dest exchange to source exchange
public
exchange_bind(string $destination, string $source[, string $routing_key = '' ][, bool $nowait = false ][, AMQPTable|array<string|int, mixed> $arguments = array() ][, int|null $ticket = null ]) : mixed|null
Parameters
- $destination : string
- $source : string
- $routing_key : string = ''
- $nowait : bool = false
- $arguments : AMQPTable|array<string|int, mixed> = array()
- $ticket : int|null = null
Tags
Return values
mixed|null —exchange_declare()
Declares exchange
public
exchange_declare(string $exchange, string $type[, bool $passive = false ][, bool $durable = false ][, bool $auto_delete = true ][, bool $internal = false ][, bool $nowait = false ][, AMQPTable|array<string|int, mixed> $arguments = array() ][, int|null $ticket = null ]) : mixed|null
Parameters
- $exchange : string
- $type : string
- $passive : bool = false
- $durable : bool = false
- $auto_delete : bool = true
- $internal : bool = false
- $nowait : bool = false
- $arguments : AMQPTable|array<string|int, mixed> = array()
- $ticket : int|null = null
Tags
Return values
mixed|null —exchange_delete()
Deletes an exchange
public
exchange_delete(string $exchange[, bool $if_unused = false ][, bool $nowait = false ][, int|null $ticket = null ]) : mixed|null
Parameters
- $exchange : string
- $if_unused : bool = false
- $nowait : bool = false
- $ticket : int|null = null
Tags
Return values
mixed|null —exchange_unbind()
Unbinds dest exchange from source exchange
public
exchange_unbind(string $destination, string $source[, string $routing_key = '' ][, bool $nowait = false ][, AMQPTable|array<string|int, mixed> $arguments = array() ][, int|null $ticket = null ]) : mixed
Parameters
- $destination : string
- $source : string
- $routing_key : string = ''
- $nowait : bool = false
- $arguments : AMQPTable|array<string|int, mixed> = array()
- $ticket : int|null = null
Tags
Return values
mixed —flow()
Enables/disables flow from peer
public
flow(bool $active) : mixed
Parameters
- $active : bool
Tags
Return values
mixed —getChannelId()
public
getChannelId() : int|null
Return values
int|null —getConnection()
public
getConnection() : AbstractConnection|null
Return values
AbstractConnection|null —getMethodQueue()
public
getMethodQueue() : array<string|int, mixed>
Return values
array<string|int, mixed> —getProtocolVersion()
public
static getProtocolVersion() : string
Tags
Return values
string —hasPendingMethods()
public
hasPendingMethods() : bool
Return values
bool —is_consuming()
public
is_consuming() : bool
Return values
bool —is_open()
public
is_open() : bool
Return values
bool —publish_batch()
Publish batch
public
publish_batch() : void
Tags
Return values
void —queue_bind()
Binds queue to an exchange
public
queue_bind(string $queue, string $exchange[, string $routing_key = '' ][, bool $nowait = false ][, AMQPTable|array<string|int, mixed> $arguments = array() ][, int|null $ticket = null ]) : mixed|null
Parameters
- $queue : string
- $exchange : string
- $routing_key : string = ''
- $nowait : bool = false
- $arguments : AMQPTable|array<string|int, mixed> = array()
- $ticket : int|null = null
Tags
Return values
mixed|null —queue_declare()
Declares queue, creates if needed
public
queue_declare([string $queue = '' ][, bool $passive = false ][, bool $durable = false ][, bool $exclusive = false ][, bool $auto_delete = true ][, bool $nowait = false ][, array<string|int, mixed>|AMQPTable $arguments = array() ][, int|null $ticket = null ]) : array<string|int, mixed>|null
Parameters
- $queue : string = ''
- $passive : bool = false
- $durable : bool = false
- $exclusive : bool = false
- $auto_delete : bool = true
- $nowait : bool = false
- $arguments : array<string|int, mixed>|AMQPTable = array()
- $ticket : int|null = null
Tags
Return values
array<string|int, mixed>|null —queue_delete()
Deletes a queue
public
queue_delete([string $queue = '' ][, bool $if_unused = false ][, bool $if_empty = false ][, bool $nowait = false ][, int|null $ticket = null ]) : mixed|null
Parameters
- $queue : string = ''
- $if_unused : bool = false
- $if_empty : bool = false
- $nowait : bool = false
- $ticket : int|null = null
Tags
Return values
mixed|null —queue_purge()
Purges a queue
public
queue_purge([string $queue = '' ][, bool $nowait = false ][, int|null $ticket = null ]) : mixed|null
Parameters
- $queue : string = ''
- $nowait : bool = false
- $ticket : int|null = null
Tags
Return values
mixed|null —queue_unbind()
Unbind queue from an exchange
public
queue_unbind(string $queue, string $exchange[, string $routing_key = '' ][, AMQPTable|array<string|int, mixed> $arguments = array() ][, int|null $ticket = null ]) : mixed
Parameters
- $queue : string
- $exchange : string
- $routing_key : string = ''
- $arguments : AMQPTable|array<string|int, mixed> = array()
- $ticket : int|null = null
Tags
Return values
mixed —set_ack_handler()
Sets a handler which called for any message ack'ed by the server, with the AMQPMessage as first argument.
public
set_ack_handler(callable $callback) : mixed
Parameters
- $callback : callable
Tags
Return values
mixed —set_nack_handler()
Sets a handler which called for any message nack'ed by the server, with the AMQPMessage as first argument.
public
set_nack_handler(callable $callback) : mixed
Parameters
- $callback : callable
Tags
Return values
mixed —set_return_listener()
Sets callback for basic_return
public
set_return_listener(callable $callback) : mixed
Parameters
- $callback : callable
Tags
Return values
mixed —setBodySizeLimit()
public
setBodySizeLimit(int $max_bytes) : $this
Parameters
- $max_bytes : int
-
Max message body size for this channel
Return values
$this —stopConsume()
Stop AMQPChannel::consume() loop. Useful for signal handlers and other interrupts.
public
stopConsume() : mixed
Tags
Return values
mixed —tx_commit()
public
tx_commit() : mixed
Tags
Return values
mixed —tx_rollback()
Rollbacks the current transaction
public
tx_rollback() : mixed
Tags
Return values
mixed —tx_select()
Selects standard transaction mode
public
tx_select() : mixed
Tags
Return values
mixed —wait()
Wait for some expected AMQP methods and dispatch to them.
public
wait([array<string|int, mixed>|null $allowed_methods = null ][, bool $non_blocking = false ], int|float|null $timeout) : mixed
Unexpected methods are queued up for later calls to this PHP method.
Parameters
- $allowed_methods : array<string|int, mixed>|null = null
- $non_blocking : bool = false
- $timeout : int|float|null
Tags
Return values
mixed —wait_content()
public
wait_content() : AMQPMessage
Tags
Return values
AMQPMessage —wait_for_pending_acks()
Waits for pending acks and nacks from the server.
public
wait_for_pending_acks(int|float $timeout) : mixed
If there are no pending acks, the method returns immediately
Parameters
- $timeout : int|float
-
Waits until $timeout value is reached
Tags
Return values
mixed —wait_for_pending_acks_returns()
Waits for pending acks, nacks and returns from the server.
public
wait_for_pending_acks_returns(int|float $timeout) : mixed
If there are no pending acks, the method returns immediately.
Parameters
- $timeout : int|float
-
If set to value > 0 the method will wait at most $timeout seconds for pending acks.
Tags
Return values
mixed —access_request_ok()
Grants access to server resources
protected
access_request_ok(AMQPReader $reader) : int
Parameters
- $reader : AMQPReader
Return values
int —basic_ack_from_server()
Called when the server sends a basic.ack
protected
basic_ack_from_server(AMQPReader $reader) : void
Parameters
- $reader : AMQPReader
Tags
Return values
void —basic_cancel_from_server()
protected
basic_cancel_from_server(AMQPReader $reader) : mixed
Parameters
- $reader : AMQPReader
Tags
Return values
mixed —basic_cancel_ok()
Confirm a cancelled consumer
protected
basic_cancel_ok(AMQPReader $reader) : string
Parameters
- $reader : AMQPReader
Return values
string —basic_consume_ok()
Confirms a new consumer
protected
basic_consume_ok(AMQPReader $reader) : string
Parameters
- $reader : AMQPReader
Return values
string —basic_deliver()
Notifies the client of a consumer message
protected
basic_deliver(AMQPReader $reader, AMQPMessage $message) : void
Parameters
- $reader : AMQPReader
- $message : AMQPMessage
Return values
void —basic_get_empty()
Indicates no messages available
protected
basic_get_empty() : mixed
Return values
mixed —basic_get_ok()
Provides client with a message
protected
basic_get_ok(AMQPReader $reader, AMQPMessage $message) : AMQPMessage
Parameters
- $reader : AMQPReader
- $message : AMQPMessage
Return values
AMQPMessage —basic_nack_from_server()
Called when the server sends a basic.nack
protected
basic_nack_from_server(AMQPReader $reader) : void
Parameters
- $reader : AMQPReader
Tags
Return values
void —basic_qos_ok()
Confirms QoS request
protected
basic_qos_ok() : mixed
Return values
mixed —basic_recover_ok()
Confirm the requested recover
protected
basic_recover_ok() : mixed
Return values
mixed —basic_return()
Returns a failed message
protected
basic_return(AMQPReader $reader, AMQPMessage $message) : mixed
Parameters
- $reader : AMQPReader
- $message : AMQPMessage
Return values
mixed —channel_alert()
Only for AMQP0.8.0 This method allows the server to send a non-fatal warning to the client. This is used for methods that are normally asynchronous and thus do not have confirmations, and for which the server may detect errors that need to be reported. Fatal errors are handled as channel or connection exceptions; non- fatal errors are sent through this method.
protected
channel_alert(AMQPReader $reader) : void
Parameters
- $reader : AMQPReader
Return values
void —channel_close()
protected
channel_close(AMQPReader $reader) : void
Parameters
- $reader : AMQPReader
Tags
Return values
void —channel_close_ok()
Confirm a channel close Alias of AMQPChannel::do_close()
protected
channel_close_ok() : mixed
Return values
mixed —channel_flow()
protected
channel_flow(AMQPReader $reader) : void
Parameters
- $reader : AMQPReader
Return values
void —channel_flow_ok()
protected
channel_flow_ok(AMQPReader $reader) : bool
Parameters
- $reader : AMQPReader
Return values
bool —channel_open_ok()
protected
channel_open_ok() : mixed
Return values
mixed —createMessage()
protected
createMessage(AMQPReader $propertyReader, int $bodySize) : AMQPMessage
Parameters
- $propertyReader : AMQPReader
- $bodySize : int
Return values
AMQPMessage —dispatch_deferred_method()
protected
dispatch_deferred_method(array<string|int, mixed> $queued_method) : mixed
Parameters
- $queued_method : array<string|int, mixed>
Return values
mixed —dispatch_to_handler()
protected
dispatch_to_handler(callable $handler[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
- $handler : callable
- $arguments : array<string|int, mixed> = []
Return values
mixed —do_close()
Tear down this object, after we've agreed to close with the server.
protected
do_close() : mixed
Return values
mixed —exchange_bind_ok()
Confirms bind successful
protected
exchange_bind_ok() : mixed
Return values
mixed —exchange_declare_ok()
Confirms an exchange declaration
protected
exchange_declare_ok() : mixed
Return values
mixed —exchange_delete_ok()
Confirms deletion of an exchange
protected
exchange_delete_ok() : mixed
Return values
mixed —exchange_unbind_ok()
Confirms unbind successful
protected
exchange_unbind_ok() : mixed
Return values
mixed —get_and_unset_message()
Helper method to get a particular method from $this->publishedMessages, removes it from the array and returns it.
protected
get_and_unset_message(int $index) : AMQPMessage
Parameters
- $index : int
Return values
AMQPMessage —get_keys_less_or_equal()
protected
get_keys_less_or_equal(array<string|int, AMQPMessage> $messages, string $value) : mixed
Parameters
- $messages : array<string|int, AMQPMessage>
- $value : string
Return values
mixed —getTicket()
protected
getTicket(int|null $ticket) : int
Parameters
- $ticket : int|null
Return values
int —internal_ack_handler()
Handles the deletion of messages from this->publishedMessages and dispatches them to the $handler
protected
internal_ack_handler(int $delivery_tag, bool $multiple, callable $handler) : mixed
Parameters
- $delivery_tag : int
- $multiple : bool
- $handler : callable
Return values
mixed —maybe_wait_for_content()
protected
maybe_wait_for_content(string $method_sig) : AMQPMessage|null
Parameters
- $method_sig : string
Return values
AMQPMessage|null —next_frame()
protected
next_frame(int|float|null $timeout) : Frame
Parameters
- $timeout : int|float|null
Return values
Frame —parseMethod()
protected
parseMethod(string $payload) : Method
Parameters
- $payload : string
Return values
Method —prepare_method_frame()
This is here for performance reasons to batch calls to fwrite from basic.publish
protected
prepare_method_frame(array<string|int, mixed> $method_sig[, AMQPWriter|string $args = '' ][, AMQPWriter $pkt = null ]) : AMQPWriter
Parameters
- $method_sig : array<string|int, mixed>
- $args : AMQPWriter|string = ''
- $pkt : AMQPWriter = null
Return values
AMQPWriter —process_deferred_methods()
protected
process_deferred_methods(array<string|int, mixed>|null $allowed_methods) : array<string|int, mixed>
Parameters
- $allowed_methods : array<string|int, mixed>|null
Return values
array<string|int, mixed> —queue_bind_ok()
Confirms bind successful
protected
queue_bind_ok() : mixed
Return values
mixed —queue_declare_ok()
Confirms a queue definition
protected
queue_declare_ok(AMQPReader $reader) : array<string|int, string>
Parameters
- $reader : AMQPReader
Return values
array<string|int, string> —queue_delete_ok()
Confirms deletion of a queue
protected
queue_delete_ok(AMQPReader $reader) : int|string
Parameters
- $reader : AMQPReader
Return values
int|string —queue_purge_ok()
Confirms a queue purge
protected
queue_purge_ok(AMQPReader $reader) : int|string
Parameters
- $reader : AMQPReader
Return values
int|string —queue_unbind_ok()
Confirms unbind successful
protected
queue_unbind_ok() : mixed
Return values
mixed —send_method_frame()
protected
send_method_frame(array<string|int, mixed> $method_sig[, AMQPWriter|string $args = '' ]) : mixed
Parameters
- $method_sig : array<string|int, mixed>
- $args : AMQPWriter|string = ''
Return values
mixed —should_dispatch_method()
protected
should_dispatch_method(array<string|int, mixed>|null $allowed_methods, string $method_sig) : bool
Parameters
- $allowed_methods : array<string|int, mixed>|null
- $method_sig : string
Return values
bool —tx_commit_ok()
Confirms a successful commit
protected
tx_commit_ok() : mixed
Return values
mixed —tx_rollback_ok()
Confirms a successful rollback
protected
tx_rollback_ok() : mixed
Return values
mixed —tx_select_ok()
Confirms transaction mode
protected
tx_select_ok() : mixed
Return values
mixed —validate_frame()
protected
validate_frame(Frame $frame, int $expectedType) : void
Parameters
- $frame : Frame
- $expectedType : int
Tags
Return values
void —validate_frame_payload()
protected
validate_frame_payload(Frame $frame) : void
Parameters
- $frame : Frame
Tags
Return values
void —validate_method_frame()
protected
validate_method_frame(Frame $frame) : void
Parameters
- $frame : Frame
Tags
Return values
void —x_flow_ok()
protected
x_flow_ok(bool $active) : mixed
Parameters
- $active : bool
Return values
mixed —x_open()
protected
x_open([string $out_of_band = '' ]) : mixed
Parameters
- $out_of_band : string = ''
Tags
Return values
mixed —checkConnection()
private
checkConnection() : mixed
Tags
Return values
mixed —prePublish()
private
prePublish(string $exchange, string $routing_key, bool $mandatory, bool $immediate, int $ticket) : mixed
Parameters
- $exchange : string
- $routing_key : string
- $mandatory : bool
- $immediate : bool
- $ticket : int