/** * @param string $serializedEnvelope */ public function consume($serializedEnvelope) { // Unserialize $envelope = $this->messageInEnvelopeSerializer->unwrapAndDeserialize($serializedEnvelope); // Tell the world $this->dispathcer->dispatch(PreHandleMessage::NAME, new PreHandleMessage($envelope)); // Handle the message $this->messageBus->handle($envelope->message()); }
public function consume($serializedEnvelope) { $envelope = $this->messageInEnvelopeSerializer->unwrapAndDeserialize($serializedEnvelope); $this->messageBus->handle($envelope->message()); }
/** * Deserialize a Message that was wrapped in an Envelope. * * {@inheritdoc} */ public function unwrapAndDeserialize($serializedEnvelope) { return $this->serializer->unwrapAndDeserialize($serializedEnvelope); }