Channel
in package
uses
ChannelsMethods
Table of Contents
Methods
- __construct() : mixed
- ack() : bool
- ack send
- basicAck() : bool
- send AMQP basic.ack frame
- basicCancel() : bool
- send AMQP basic.cancel frame
- basicConsume() : bool
- send AMQP basic.consume frame
- basicGet() : bool
- send AMQP basic.get frame
- basicNack() : bool
- send AMQP basic.nack frame
- basicPublish() : int|null
- send AMQP basic.publish frame
- basicQos() : bool
- send AMQP basic.qos frame
- basicRecover() : bool
- send AMQP basic.recover frame
- basicReject() : bool
- send AMQP basic.reject frame
- cancel() : bool|MethodBasicCancelOkFrame
- channelClose() : bool
- send AMQP channel.close frame
- channelCloseOk() : bool
- send AMQP channel.close-ok frame
- channelFlow() : bool
- send AMQP channel.flow frame
- channelFlowOk() : bool
- send AMQP channel.flow-ok frame
- channelOpen() : bool
- send AMQP channel.open frame
- close() : MethodChannelCloseOkFrame|bool|null
- current channel close
- commit() : MethodTxCommitOkFrame
- commit transaction
- confirm() : MethodBasicAckFrame|MethodBasicNackFrame
- confirm mode
- confirmSelect() : bool
- send AMQP confirm.select frame
- consume() : MethodBasicConsumeOkFrame
- consume message
- exchangeBind() : bool|MethodExchangeBindOkFrame
- send AMQP exchange.bind frame
- exchangeDeclare() : bool|MethodExchangeDeclareOkFrame
- send AMQP exchange.declare frame
- exchangeDelete() : bool|MethodExchangeDeleteOkFrame
- send AMQP exchange.delete frame
- exchangeUnbind() : bool|MethodExchangeUnbindOkFrame
- send AMQP exchange.unbind frame
- frameSend() : bool|null
- connection send frame - channel only send frame, not buffer
- get() : void
- get message
- getMode() : int
- get channel mode
- getState() : int
- get channel state
- id() : int
- channel id
- nack() : bool
- Nack send
- onFrameReceived() : void
- on frame received
- publish() : int|null
- publish message
- queueBind() : bool|MethodQueueBindOkFrame
- send AMQP queue.bind frame
- queueDeclare() : bool|MethodQueueDeclareOkFrame
- send AMQP queue.declare frame
- queueDelete() : bool|MethodQueueDeleteOkFrame
- send AMQP queue.delete frame
- queuePurge() : bool|MethodQueuePurgeOkFrame
- send AMQP queue.purge frame
- queueUnbind() : bool
- send AMQP queue.unbind frame
- reject() : bool
- reject send
- returnCallbackRegister() : $this
- register return callback
- returnCallbackUnregister() : $this
- unregister return callback
- rollback() : MethodTxRollbackOkFrame
- rollback transaction
- select() : MethodTxSelectOkFrame
- start transactional mode
- setMode() : void
- set channel mode
- setState() : void
- set channel state
- txCommit() : bool
- send AMQP tx.commit frame
- txRollback() : bool
- send AMQP tx.rollback frame
- txSelect() : bool
- send AMQP tx.select frame
Methods
__construct()
public
__construct(Connection $connection, int $channelId) : mixed
Parameters
- $connection : Connection
- $channelId : int
ack()
ack send
public
ack(Message $message[, bool $multiple = false ]) : bool
Parameters
- $message : Message
- $multiple : bool = false
Return values
boolbasicAck()
send AMQP basic.ack frame
public
basicAck(int $channel, int $deliveryTag[, bool $multiple = false ]) : bool
Parameters
- $channel : int
- $deliveryTag : int
- $multiple : bool = false
Return values
boolbasicCancel()
send AMQP basic.cancel frame
public
basicCancel(int $channel, string $consumerTag[, bool $nowait = false ]) : bool
Parameters
- $channel : int
- $consumerTag : string
- $nowait : bool = false
Return values
boolbasicConsume()
send AMQP basic.consume frame
public
basicConsume(int $channel[, string $queue = '' ][, string $consumerTag = '' ][, bool $noLocal = false ][, bool $noAck = false ][, bool $exclusive = false ][, bool $nowait = false ][, array<string|int, mixed> $arguments = [] ]) : bool
Parameters
- $channel : int
- $queue : string = ''
- $consumerTag : string = ''
- $noLocal : bool = false
- $noAck : bool = false
- $exclusive : bool = false
- $nowait : bool = false
- $arguments : array<string|int, mixed> = []
Return values
boolbasicGet()
send AMQP basic.get frame
public
basicGet(int $channel[, string $queue = '' ][, bool $noAck = false ]) : bool
Parameters
- $channel : int
- $queue : string = ''
- $noAck : bool = false
Return values
boolbasicNack()
send AMQP basic.nack frame
public
basicNack(int $channel, int $deliveryTag[, bool $multiple = false ][, bool $requeue = false ]) : bool
Parameters
- $channel : int
- $deliveryTag : int
- $multiple : bool = false
- $requeue : bool = false
Return values
boolbasicPublish()
send AMQP basic.publish frame
public
basicPublish(int $channel, string $exchange[, array<string|int, mixed> $headers = [] ][, string $body = '' ][, string $routingKey = '' ][, bool $mandatory = false ][, bool $immediate = false ]) : int|null
Parameters
- $channel : int
- $exchange : string
- $headers : array<string|int, mixed> = []
- $body : string = ''
- $routingKey : string = ''
- $mandatory : bool = false
- $immediate : bool = false
Return values
int|nullbasicQos()
send AMQP basic.qos frame
public
basicQos(int $channel[, int $prefetchSize = 0 ][, int $prefetchCount = 0 ][, bool $global = false ]) : bool
Parameters
- $channel : int
- $prefetchSize : int = 0
- $prefetchCount : int = 0
- $global : bool = false
Return values
boolbasicRecover()
send AMQP basic.recover frame
public
basicRecover(int $channel[, bool $requeue = false ]) : bool
Parameters
- $channel : int
- $requeue : bool = false
Return values
boolbasicReject()
send AMQP basic.reject frame
public
basicReject(int $channel, int $deliveryTag[, bool $requeue = false ]) : bool
Parameters
- $channel : int
- $deliveryTag : int
- $requeue : bool = false
Return values
boolcancel()
public
cancel(string $consumerTag[, bool $nowait = false ]) : bool|MethodBasicCancelOkFrame
Parameters
- $consumerTag : string
- $nowait : bool = false
Return values
bool|MethodBasicCancelOkFramechannelClose()
send AMQP channel.close frame
public
channelClose(int $channel, int $replyCode, string $replyText, int $closeClassId, int $closeMethodId) : bool
Parameters
- $channel : int
- $replyCode : int
- $replyText : string
- $closeClassId : int
- $closeMethodId : int
Return values
boolchannelCloseOk()
send AMQP channel.close-ok frame
public
channelCloseOk(int $channel) : bool
Parameters
- $channel : int
Return values
boolchannelFlow()
send AMQP channel.flow frame
public
channelFlow(int $channel, bool $active) : bool
Parameters
- $channel : int
- $active : bool
Return values
boolchannelFlowOk()
send AMQP channel.flow-ok frame
public
channelFlowOk(int $channel, bool $active) : bool
Parameters
- $channel : int
- $active : bool
Return values
boolchannelOpen()
send AMQP channel.open frame
public
channelOpen(int $channel[, string $outOfBand = '' ]) : bool
Parameters
- $channel : int
- $outOfBand : string = ''
Return values
boolclose()
current channel close
public
close([int $replyCode = 0 ][, string $replyText = '' ][, bool $nowait = false ]) : MethodChannelCloseOkFrame|bool|null
Parameters
- $replyCode : int = 0
- $replyText : string = ''
- $nowait : bool = false
Return values
MethodChannelCloseOkFrame|bool|nullcommit()
commit transaction
public
commit() : MethodTxCommitOkFrame
Return values
MethodTxCommitOkFrameconfirm()
confirm mode
public
confirm(Closure $action[, bool $nowait = false ]) : MethodBasicAckFrame|MethodBasicNackFrame
Parameters
- $action : Closure
- $nowait : bool = false
Return values
MethodBasicAckFrame|MethodBasicNackFrameconfirmSelect()
send AMQP confirm.select frame
public
confirmSelect(int $channel) : bool
Parameters
- $channel : int
Return values
boolconsume()
consume message
public
consume(Closure $callback[, string $queue = '' ][, string $consumerTag = '' ][, bool $noLocal = false ][, bool $noAck = false ][, bool $exclusive = false ][, bool $nowait = false ][, array<string|int, mixed> $arguments = [] ]) : MethodBasicConsumeOkFrame
Parameters
- $callback : Closure
-
= function(Message $message, Channel $channel, Connection $connection) }
- $queue : string = ''
- $consumerTag : string = ''
- $noLocal : bool = false
- $noAck : bool = false
- $exclusive : bool = false
- $nowait : bool = false
- $arguments : array<string|int, mixed> = []
Return values
MethodBasicConsumeOkFrameexchangeBind()
send AMQP exchange.bind frame
public
exchangeBind(int $channel, string $destination, string $source[, string $routingKey = '' ][, bool $nowait = false ][, array<string|int, mixed> $arguments = [] ]) : bool|MethodExchangeBindOkFrame
Parameters
- $channel : int
- $destination : string
- $source : string
- $routingKey : string = ''
- $nowait : bool = false
- $arguments : array<string|int, mixed> = []
Return values
bool|MethodExchangeBindOkFrameexchangeDeclare()
send AMQP exchange.declare frame
public
exchangeDeclare(int $channel, string $exchange[, string $exchangeType = 'direct' ][, bool $passive = false ][, bool $durable = false ][, bool $autoDelete = false ][, bool $internal = false ][, bool $nowait = false ][, array<string|int, mixed> $arguments = [] ]) : bool|MethodExchangeDeclareOkFrame
Parameters
- $channel : int
- $exchange : string
- $exchangeType : string = 'direct'
- $passive : bool = false
- $durable : bool = false
- $autoDelete : bool = false
- $internal : bool = false
- $nowait : bool = false
- $arguments : array<string|int, mixed> = []
Return values
bool|MethodExchangeDeclareOkFrameexchangeDelete()
send AMQP exchange.delete frame
public
exchangeDelete(int $channel, string $exchange[, bool $ifUnused = false ][, bool $nowait = false ]) : bool|MethodExchangeDeleteOkFrame
Parameters
- $channel : int
- $exchange : string
- $ifUnused : bool = false
- $nowait : bool = false
Return values
bool|MethodExchangeDeleteOkFrameexchangeUnbind()
send AMQP exchange.unbind frame
public
exchangeUnbind(int $channel, string $destination, string $source[, string $routingKey = '' ][, bool $nowait = false ][, array<string|int, mixed> $arguments = [] ]) : bool|MethodExchangeUnbindOkFrame
Parameters
- $channel : int
- $destination : string
- $source : string
- $routingKey : string = ''
- $nowait : bool = false
- $arguments : array<string|int, mixed> = []
Return values
bool|MethodExchangeUnbindOkFrameframeSend()
connection send frame - channel only send frame, not buffer
public
frameSend(AbstractFrame $frame) : bool|null
Parameters
- $frame : AbstractFrame
Return values
bool|nullget()
get message
public
get(Closure $callback[, string $queue = '' ][, bool $noAck = false ][, bool $nowait = false ]) : void
Parameters
- $callback : Closure
-
= function(Message $message, Channel $channel, Connection $connection) }
- $queue : string = ''
- $noAck : bool = false
- $nowait : bool = false
-
when true, return null, non-blocking; when false, return MethodBasicGetOkFrame|MethodBasicGetEmptyFrame, blocking
getMode()
get channel mode
public
getMode() : int
Return values
intgetState()
get channel state
public
getState() : int
Return values
intid()
channel id
public
id() : int
Return values
intnack()
Nack send
public
nack(Message $message[, bool $multiple = false ][, bool $requeue = true ]) : bool
Parameters
- $message : Message
- $multiple : bool = false
- $requeue : bool = true
Return values
boolonFrameReceived()
on frame received
public
onFrameReceived(AbstractFrame $frame) : void
Parameters
- $frame : AbstractFrame
publish()
publish message
public
publish(string $body, array<string|int, mixed> $headers, string $exchange[, string $routingKey = '' ][, bool $mandatory = false ][, bool $immediate = false ]) : int|null
Parameters
- $body : string
- $headers : array<string|int, mixed>
- $exchange : string
- $routingKey : string = ''
- $mandatory : bool = false
- $immediate : bool = false
Return values
int|nullqueueBind()
send AMQP queue.bind frame
public
queueBind(int $channel, string $queue, string $exchange[, string $routingKey = '' ][, bool $nowait = false ][, array<string|int, mixed> $arguments = [] ]) : bool|MethodQueueBindOkFrame
Parameters
- $channel : int
- $queue : string
- $exchange : string
- $routingKey : string = ''
- $nowait : bool = false
- $arguments : array<string|int, mixed> = []
Return values
bool|MethodQueueBindOkFramequeueDeclare()
send AMQP queue.declare frame
public
queueDeclare(int $channel[, string $queue = '' ][, bool $passive = false ][, bool $durable = false ][, bool $exclusive = false ][, bool $autoDelete = false ][, bool $nowait = false ][, array<string|int, mixed> $arguments = [] ]) : bool|MethodQueueDeclareOkFrame
Parameters
- $channel : int
- $queue : string = ''
- $passive : bool = false
- $durable : bool = false
- $exclusive : bool = false
- $autoDelete : bool = false
- $nowait : bool = false
- $arguments : array<string|int, mixed> = []
Return values
bool|MethodQueueDeclareOkFramequeueDelete()
send AMQP queue.delete frame
public
queueDelete(int $channel[, string $queue = '' ][, bool $ifUnused = false ][, bool $ifEmpty = false ][, bool $nowait = false ]) : bool|MethodQueueDeleteOkFrame
Parameters
- $channel : int
- $queue : string = ''
- $ifUnused : bool = false
- $ifEmpty : bool = false
- $nowait : bool = false
Return values
bool|MethodQueueDeleteOkFramequeuePurge()
send AMQP queue.purge frame
public
queuePurge(int $channel[, string $queue = '' ][, bool $nowait = false ]) : bool|MethodQueuePurgeOkFrame
Parameters
- $channel : int
- $queue : string = ''
- $nowait : bool = false
Return values
bool|MethodQueuePurgeOkFramequeueUnbind()
send AMQP queue.unbind frame
public
queueUnbind(int $channel, string $queue, string $exchange[, string $routingKey = '' ][, array<string|int, mixed> $arguments = [] ]) : bool
Parameters
- $channel : int
- $queue : string
- $exchange : string
- $routingKey : string = ''
- $arguments : array<string|int, mixed> = []
Return values
boolreject()
reject send
public
reject(Message $message[, bool $requeue = true ]) : bool
Parameters
- $message : Message
- $requeue : bool = true
Return values
boolreturnCallbackRegister()
register return callback
public
returnCallbackRegister(Closure $callback) : $this
Parameters
- $callback : Closure
Return values
$thisreturnCallbackUnregister()
unregister return callback
public
returnCallbackUnregister() : $this
Return values
$thisrollback()
rollback transaction
public
rollback() : MethodTxRollbackOkFrame
Return values
MethodTxRollbackOkFrameselect()
start transactional mode
public
select() : MethodTxSelectOkFrame
Return values
MethodTxSelectOkFramesetMode()
set channel mode
public
setMode(int $mode) : void
Parameters
- $mode : int
setState()
set channel state
public
setState(int $state) : void
Parameters
- $state : int
txCommit()
send AMQP tx.commit frame
public
txCommit(int $channel) : bool
Parameters
- $channel : int
Return values
booltxRollback()
send AMQP tx.rollback frame
public
txRollback(int $channel) : bool
Parameters
- $channel : int
Return values
booltxSelect()
send AMQP tx.select frame
public
txSelect(int $channel) : bool
Parameters
- $channel : int