src/EventListener/RequestListener.php
private function handleIronMqNotifications(GetResponseEvent $event) {
		$headers   = $event->getRequest()->headers;
		$messageId = $headers->get('iron-message-id');

		if (null === ($message = json_decode($event->getRequest()->getContent(), true))) {
			throw new \InvalidArgumentException('Unable to decode JSON');
		}

		$queue    = $this->getIronMqQueueName($event, $message);
		$metadata = [
			'iron-subscriber-message-id'  => $headers->get('iron-subscriber-message-id'),
			'iron-subscriber-message-url' => $headers->get('iron-subscriber-message-url')
		];

		unset($message['_qpush_queue']);

		$notification = new Notification(
			$messageId,
			$message,
			$metadata
		);

		$this->dispatcher->dispatch(
			Events::Notification($queue),
			new NotificationEvent($queue, NotificationEvent::TYPE_MESSAGE, $notification)
		);

		return "IronMQ Notification Received.";
	}
private function handleIronMqNotifications(GetResponseEvent $event) {
		$headers   = $event->getRequest()->headers;
		$messageId = $headers->get('iron-message-id');

		if (null === ($message = json_decode($event->getRequest()->getContent(), true))) {
			throw new \InvalidArgumentException('Unable to decode JSON');
		}

		$queue    = $this->getIronMqQueueName($event, $message);
		$metadata = [
			'iron-subscriber-message-id'  => $headers->get('iron-subscriber-message-id'),
			'iron-subscriber-message-url' => $headers->get('iron-subscriber-message-url')
		];

		unset($message['_qpush_queue']);

		$notification = new Notification(
			$messageId,
			$message,
			$metadata
		);

		$this->dispatcher->dispatch(
			Events::Notification($queue),
			new NotificationEvent($queue, NotificationEvent::TYPE_MESSAGE, $notification)
		);

		return "IronMQ Notification Received.";
	}
private function handleIronMqNotifications ( GetResponseEvent $ event ) { $ headers = $ event -> getRequest ( ) -> headers ; $ messageId = $ headers -> get ( 'iron-message-id' ) ; if ( null === ( $ message = json_decode ( $ event -> getRequest ( ) -> getContent ( ) , true ) ) ) { throw new \ InvalidArgumentException ( 'Unable to decode JSON' ) ; } $ queue = $ this -> getIronMqQueueName ( $ event , $ message ) ; $ metadata = [ 'iron-subscriber-message-id' => $ headers -> get ( 'iron-subscriber-message-id' ) , 'iron-subscriber-message-url' => $ headers -> get ( 'iron-subscriber-message-url' ) ] ; unset ( $ message [ '_qpush_queue' ] ) ; $ notification = new Notification ( $ messageId , $ message , $ metadata ) ; $ this -> dispatcher -> dispatch ( Events :: Notification ( $ queue ) , new NotificationEvent ( $ queue , NotificationEvent :: TYPE_MESSAGE , $ notification ) ) ; return "IronMQ Notification Received." ; }
Handles Messages sent from a IronMQ Push Queue

@param GetResponseEvent $event The Kernel Request's GetResponseEvent
@return string|void
Handles Messages sent from a IronMQ Push Queue