Class yii\queue\amqp_interop\Queue

Inheritanceyii\queue\amqp_interop\Queue » yii\queue\cli\Queue » yii\queue\Queue » yii\base\Component
Implementsyii\base\BootstrapInterface
Available since version2.0.2

Amqp Queue

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$attempts integer Default attempt count yii\queue\Queue
$commandClass string Command class name yii\queue\amqp_interop\Queue
$commandOptions array Of additional options of command yii\queue\cli\Queue
$connectionTimeout float|null yii\queue\amqp_interop\Queue
$driver string yii\queue\amqp_interop\Queue
$dsn string yii\queue\amqp_interop\Queue
$exchangeName string yii\queue\amqp_interop\Queue
$heartbeat float|null yii\queue\amqp_interop\Queue
$host string|null yii\queue\amqp_interop\Queue
$lazy boolean|null yii\queue\amqp_interop\Queue
$loopConfig array|string yii\queue\cli\Queue
$maxPriority integer yii\queue\amqp_interop\Queue
$messageHandler callable|null yii\queue\cli\Queue
$password string|null yii\queue\amqp_interop\Queue
$persisted boolean|null yii\queue\amqp_interop\Queue
$port string|null yii\queue\amqp_interop\Queue
$qosGlobal boolean|null yii\queue\amqp_interop\Queue
$qosPrefetchCount integer|null yii\queue\amqp_interop\Queue
$qosPrefetchSize integer|null yii\queue\amqp_interop\Queue
$queueName string yii\queue\amqp_interop\Queue
$readTimeout float|null yii\queue\amqp_interop\Queue
$serializer yii\queue\serializers\SerializerInterface|array yii\queue\Queue
$sslCacert string|null yii\queue\amqp_interop\Queue
$sslCert string|null yii\queue\amqp_interop\Queue
$sslKey string|null yii\queue\amqp_interop\Queue
$sslOn boolean|null yii\queue\amqp_interop\Queue
$sslVerify boolean|null yii\queue\amqp_interop\Queue
$strictJobType boolean Whether to enable strict job type control. yii\queue\Queue
$ttr integer Default time to reserve a job yii\queue\Queue
$user string|null yii\queue\amqp_interop\Queue
$vhost string|null yii\queue\amqp_interop\Queue
$writeTimeout float|null yii\queue\amqp_interop\Queue

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
ATTEMPT 'yii-attempt' yii\queue\amqp_interop\Queue
DELAY 'yii-delay' yii\queue\amqp_interop\Queue
ENQUEUE_AMQP_BUNNY 'enqueue/amqp-bunny' yii\queue\amqp_interop\Queue
ENQUEUE_AMQP_EXT 'enqueue/amqp-ext' yii\queue\amqp_interop\Queue
ENQUEUE_AMQP_LIB 'enqueue/amqp-lib' yii\queue\amqp_interop\Queue
PRIORITY 'yii-priority' yii\queue\amqp_interop\Queue
STATUS_DONE 3 yii\queue\Queue
STATUS_RESERVED 2 yii\queue\Queue
STATUS_WAITING 1 yii\queue\Queue
TTR 'yii-ttr' yii\queue\amqp_interop\Queue

Property Details

$commandClass public property

Command class name

public string $commandClass = \yii\queue\amqp_interop\Command::class
$connectionTimeout public property
$context protected property
protected \Interop\Amqp\AmqpContext $context null
$driver public property
public string $driver self::ENQUEUE_AMQP_LIB
$dsn public property
public string $dsn null
$exchangeName public property
public string $exchangeName 'exchange'
$heartbeat public property
public float|null $heartbeat null
$host public property
public string|null $host null
$lazy public property
public boolean|null $lazy null
$maxPriority public property
public integer $maxPriority 10
$password public property
public string|null $password null
$persisted public property
public boolean|null $persisted null
$port public property
public string|null $port null
$qosGlobal public property
public boolean|null $qosGlobal null
$qosPrefetchCount public property
$qosPrefetchSize public property
$queueName public property
public string $queueName 'interop_queue'
$readTimeout public property
public float|null $readTimeout null
$setupBrokerDone protected property
protected boolean $setupBrokerDone false
$sslCacert public property
public string|null $sslCacert null
$sslCert public property
public string|null $sslCert null
$sslKey public property
public string|null $sslKey null
$sslOn public property
public boolean|null $sslOn null
$sslVerify public property
public boolean|null $sslVerify null
$supportedDrivers protected property
protected string[] $supportedDrivers = [self::ENQUEUE_AMQP_LIBself::ENQUEUE_AMQP_EXTself::ENQUEUE_AMQP_BUNNY]
$user public property
public string|null $user null
$vhost public property
public string|null $vhost null
$writeTimeout public property
public float|null $writeTimeout null

Method Details

close() protected method

Closes connection and channel

protected void close ( )
getContext() public method

public \Interop\Amqp\AmqpContext getContext ( )
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 ( $payload, $ttr, $delay, $priority )
$payload
$ttr integer

Time to reserve in seconds

$delay integer
$priority mixed
return string

Id of a job message

redeliver() protected method

protected void redeliver ( \Interop\Amqp\AmqpMessage $message )
$message
setupBroker() protected method

protected void setupBroker ( )
status() public method

public integer status ( $id )
$id string

Of a job message

return integer

Status code