public function sendMessage($path, BrokeredMessage $brokeredMessage)
    {
        $httpCallContext = new HttpCallContext();
        $httpCallContext->setMethod(Resources::HTTP_POST);
        $httpCallContext->addStatusCode(Resources::STATUS_CREATED);
        $httpCallContext->setPath($path);
        $contentType = $brokeredMessage->getContentType();

        if (!is_null($contentType)) {
            $httpCallContext->addHeader(
                Resources::CONTENT_TYPE,
                $contentType
            );
        }

        $brokerProperties = $brokeredMessage->getBrokerProperties();
        if (!is_null($brokerProperties)) {
            $httpCallContext->addHeader(
                Resources::BROKER_PROPERTIES,
                $brokerProperties->toString()
            );
        }
        $customProperties = $brokeredMessage->getProperties();

        if (!empty($customProperties)) {
            foreach ($customProperties as $key => $value) {
                $value = json_encode($value);
                $httpCallContext->addHeader($key, $value);
            }
        }

        $httpCallContext->setBody($brokeredMessage->getBody());
        $this->sendHttpContext($httpCallContext);
    }