public function onMessageReceived(MessageReceivedEvent $event)
 {
     // filter out unwanted events
     if (!$event->getConsumer() instanceof \Kaliop\QueueingBundle\Service\MessageConsumer\ConsoleCommand) {
         return;
     }
     $body = $event->getBody();
     $command = @$body['command'];
     if (empty($command)) {
         /// we leave it up to the consumer to respond to these messages...
         return;
     }
     if (!$this->isCommandAllowed($command)) {
         $event->stopPropagation();
     }
 }
 public function onMessageReceived(MessageReceivedEvent $event)
 {
     // filter out unwanted events
     if (!$event->getConsumer() instanceof \Kaliop\QueueingBundle\Service\MessageConsumer\SymfonyService) {
         return;
     }
     $body = $event->getBody();
     $service = @$body['service'];
     $method = @$body['method'];
     if (empty($service) || empty($method)) {
         /// we leave it up to the consumer to respond to these messages...
         return;
     }
     if (!$this->isServiceAllowed($service, $method)) {
         $event->stopPropagation();
     }
 }
 public function onMessageReceived(MessageReceivedEvent $event)
 {
     // filter out unwanted events
     if (!$event->getConsumer() instanceof \Kaliop\QueueingBundle\Service\MessageConsumer\HTTPRequest) {
         return;
     }
     $body = $event->getBody();
     $url = @$body['url'];
     $options = @$body['options'];
     if (empty($options)) {
         /// we leave it up to the consumer to respond to these messages...
         return;
     }
     if (!$this->isServiceAllowed($url, $options)) {
         $event->stopPropagation();
     }
 }