PHP Class Uecode\Bundle\QPushBundle\Provider\IronMqProvider

Author: Keith Kirk ([email protected])
Inheritance: extends AbstractProvider
Afficher le fichier Open project: uecode/qpush-bundle Class Usage Examples

Méthodes publiques

Méthode Description
__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}

Private Methods

Méthode Description
getReservationId ( $id ) : string | null

Method Details

__construct() public méthode

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

create() public méthode

{@inheritDoc}
public create ( )

delete() public méthode

{@inheritDoc}
public delete ( $id )

destroy() public méthode

{@inheritDoc}
public destroy ( )

getProvider() public méthode

public getProvider ( )

onMessageReceived() public méthode

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
Résultat void

onNotification() public méthode

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
Résultat void

publish() public méthode

{@inheritDoc}
public publish ( array $message, array $options = [] ) : integer
$message array
$options array
Résultat integer

publishMessages() public méthode

Publishes multiple message at once
public publishMessages ( array $messages, array $options = [] ) : array
$messages array
$options array
Résultat array

queueExists() public méthode

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
Résultat boolean

queueInfo() public méthode

This allows to get queue size. Allowing to know if processing is finished or not
public queueInfo ( ) : mixed
Résultat mixed

receive() public méthode

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