PHP Класс Uecode\Bundle\QPushBundle\Provider\IronMqProvider

Автор: Keith Kirk ([email protected])
Наследование: extends AbstractProvider
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( $name, array $options, $client, Doctrine\Common\Cache\Cache $cache, Logger $logger )
create ( ) {@inheritDoc}
delete ( $id ) {@inheritDoc}
destroy ( ) {@inheritDoc}
getProvider ( )
onMessageReceived ( Uecode\Bundle\QPushBundle\Event\MessageEvent $event ) : void Removes the message from queue after all other listeners have fired
onNotification ( Uecode\Bundle\QPushBundle\Event\NotificationEvent $event, string $eventName, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher ) : void Polls the Queue on Notification from IronMQ
publish ( array $message, array $options = [] ) : integer {@inheritDoc}
publishMessages ( array $messages, array $options = [] ) : array Publishes multiple message at once
queueExists ( ) : boolean Checks whether or not the Queue exists
queueInfo ( ) : mixed Get queue info
receive ( array $options = [] ) {@inheritDoc}

Приватные методы

Метод Описание
getReservationId ( $id ) : string | null

Описание методов

__construct() публичный Метод

public __construct ( $name, array $options, $client, Doctrine\Common\Cache\Cache $cache, Logger $logger )
$options array
$cache Doctrine\Common\Cache\Cache
$logger Monolog\Logger

create() публичный Метод

{@inheritDoc}
public create ( )

delete() публичный Метод

{@inheritDoc}
public delete ( $id )

destroy() публичный Метод

{@inheritDoc}
public destroy ( )

getProvider() публичный Метод

public getProvider ( )

onMessageReceived() публичный Метод

If an earlier listener has failed or stopped propagation, this method will not fire and the Queued Message should become visible in queue again. Stops Event Propagation after removing the Message
public onMessageReceived ( Uecode\Bundle\QPushBundle\Event\MessageEvent $event ) : void
$event Uecode\Bundle\QPushBundle\Event\MessageEvent The SQS Message Event
Результат void

onNotification() публичный Метод

Dispatches the {queue}.message_received event
public onNotification ( Uecode\Bundle\QPushBundle\Event\NotificationEvent $event, string $eventName, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher ) : void
$event Uecode\Bundle\QPushBundle\Event\NotificationEvent The Notification Event
$eventName string Name of the event
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
Результат void

publish() публичный Метод

{@inheritDoc}
public publish ( array $message, array $options = [] ) : integer
$message array
$options array
Результат integer

publishMessages() публичный Метод

Publishes multiple message at once
public publishMessages ( array $messages, array $options = [] ) : array
$messages array
$options array
Результат array

queueExists() публичный Метод

This method relies on in-memory cache and the Cache provider to reduce the need to needlessly call the create method on an existing Queue.
public queueExists ( ) : boolean
Результат boolean

queueInfo() публичный Метод

This allows to get queue size. Allowing to know if processing is finished or not
public queueInfo ( ) : mixed
Результат mixed

receive() публичный Метод

{@inheritDoc}
public receive ( array $options = [] )
$options array