/** * @param Queue $queue * @param MessageInterface $message * @return void */ protected function cleanMessageInfo(Queue $queue, MessageInterface $message) { $metadatumKey = $queue->getOptions()->getMessageMetadatumKey(); if ($message->getMetadata($metadatumKey)) { $message->setMetadata($metadatumKey, null); } }