/**
  * @param OutgoingSendContext $context
  * @param callable            $next
  */
 public function invoke($context, callable $next)
 {
     $addressTags = $this->unicastRouter->route($context->getSendOptions(), $context->getMessageClass());
     if (empty($addressTags)) {
         throw new RoutingException("The message destination could not be determined. You may have misconfigured the destination for this kind of message ({$context->getMessageClass()}) when you registered the message to endpoint mappings.");
     }
     $context->setHeader(HeaderTypeEnum::MESSAGE_INTENT, MessageIntentEnum::SEND);
     $logicalMessageContext = $this->contextFactory->createLogicalMessageContextFromSendContext($addressTags, $context);
     $next($logicalMessageContext);
 }