Class yii\queue\amqp\Queue

Inheritanceyii\queue\amqp\Queue » yii\queue\cli\Queue » yii\queue\Queue » yii\base\Component
Implementsyii\base\BootstrapInterface
Deprecated since version since 2.0.2 and will be removed in 2.1. Consider using amqp_interop driver instead.

Amqp Queue

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$channel \PhpAmqpLib\Channel\AMQPChannel yii\queue\amqp\Queue
$connection \PhpAmqpLib\Connection\AMQPStreamConnection yii\queue\amqp\Queue

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
STATUS_DONE 3 yii\queue\Queue
STATUS_RESERVED 2 yii\queue\Queue
STATUS_WAITING 1 yii\queue\Queue

Property Details

$channel protected property
protected \PhpAmqpLib\Channel\AMQPChannel $channel null
$commandClass public property

Command class name

public string $commandClass = \yii\queue\amqp\Command::class
$connection protected property
protected \PhpAmqpLib\Connection\AMQPStreamConnection $connection null
$exchangeName public property
public $exchangeName 'exchange'
$host public property
public $host 'localhost'
$password public property
public $password 'guest'
$port public property
public $port 5672
$queueName public property
public $queueName 'queue'
$user public property
public $user 'guest'
$vhost public property
public $vhost '/'

Method Details

close() protected method

Closes connection and channel

protected void close ( )
init() public method

public void init ( )
listen() public method

Listens amqp-queue and runs new jobs.

public void listen ( )
open() protected method

Opens connection and channel

protected void open ( )
pushMessage() protected method

protected string pushMessage ( $message, $ttr, $delay, $priority )
$message string
$ttr integer

Time to reserve in seconds

$delay integer
$priority mixed
return string

Id of a job message

status() public method

public integer status ( $id )
$id string

Of a job message

return integer

Status code