public function invoke(HttpServletRequestInterface $servletRequest, HttpServletResponseInterface $servletResponse)
    {

        // load the application context
        /** @var \AppserverIo\Appserver\Application\Application $application */
        $application = $servletRequest->getContext();

        // unpack the message
        $message = MessageQueueProtocol::unpack($servletRequest->getBodyContent());

        // load message queue name
        $queueName = $message->getDestination()->getName();

        // lookup the message queue manager and attach the message
        $queueManager = $application->search(QueueContextInterface::IDENTIFIER);
        if ($messageQueue = $queueManager->lookup($queueName)) {
            $messageQueue->attach($message);
        } else {
            throw new \Exception("Can\'t find queue for message queue $queueName");
        }

        // finally dispatch this request, because we have finished processing it
        $servletRequest->setDispatched(true);
    }