/**
  * Removes the message from queue after all other listeners have fired
  *
  * If an earlier listener has erred 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
  *
  * @param MessageEvent $event The SQS Message Event
  * @return bool|void
  */
 public function onMessageReceived(MessageEvent $event)
 {
     $id = $event->getMessage()->getId();
     $this->delete($id);
     $event->stopPropagation();
 }
Exemple #2
0
 /**
  * Removes the message from queue after all other listeners have fired
  *
  * If an earlier listener has erred 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
  *
  * @param MessageEvent $event The SQS Message Event
  * @return bool|void
  */
 public function onMessageReceived(MessageEvent $event)
 {
     $receiptHandle = $event->getMessage()->getMetadata()->get('ReceiptHandle');
     $this->delete($receiptHandle);
     $event->stopPropagation();
 }
 /**
  * Removes the message from queue after all other listeners have fired
  *
  * If an earlier listener has errored or stopped propigation, this method
  * will not fire and the Queued Message should become visible in queue again.
  *
  * Stops Event Propagation after removing the Message
  *
  * @param MessageEvent $event The SQS Message Event
  */
 public function onMessageReceived(MessageEvent $event)
 {
     $metadata = $event->getMessage()->getMetadata();
     if (!$metadata->containsKey('iron-subscriber-message-id')) {
         $id = $event->getMessage()->getId();
         $this->delete($id);
     }
     $event->stopPropagation();
 }