public function onReject(RejectEnvelopeEvent $event) { /* @var \Bernard\Message\DefaultMessage $message */ $message = $event->getEnvelope()->getMessage(); $this->logger->error(sprintf('Error processing %s from "%s" queue', $message->get('type'), $message->getName()), ['message' => $message, 'envelope' => $event->getEnvelope(), 'exception' => $event->getException()]); }
/** * @param RejectEnvelopeEvent $event */ public function onReject(RejectEnvelopeEvent $event) { error_log($this->format($event->getEnvelope(), $event->getException())); }
/** * @param RejectEnvelopeEvent $event */ public function onReject(RejectEnvelopeEvent $event) { $this->logger->error('[bernard] caught exception {exception} while processing {envelope}.', ['envelope' => $event->getEnvelope(), 'exception' => $event->getException()]); }
/** * @param RejectEnvelopeEvent $event */ public function onReject(RejectEnvelopeEvent $event) { $envelope = $event->getEnvelope(); $event->getQueue()->acknowledge($envelope); $this->queues->create($this->name)->enqueue($envelope); }