Core/Handlers/MessageHandler.php
public function deferExchangeMessage(ExchangeEnvelope $deferredExchange, $endpointURI = null)
    {
        $exchange = new Exchange($deferredExchange);

        if (!$endpointURI) {
            $oldExchange = $deferredExchange->getBody();
            $endpointURI = $oldExchange->getHeader(Exchange::HEADER_FROM);
        }

        $endpoint = $this->getEndpointFactory()->createEndpoint($endpointURI, EndpointFactory::MODE_PRODUCE);

        $endpoint->produce($exchange);
    }
public function deferExchangeMessage(ExchangeEnvelope $deferredExchange, $endpointURI = null)
    {
        $exchange = new Exchange($deferredExchange);

        if (!$endpointURI) {
            $oldExchange = $deferredExchange->getBody();
            $endpointURI = $oldExchange->getHeader(Exchange::HEADER_FROM);
        }

        $endpoint = $this->getEndpointFactory()->createEndpoint($endpointURI, EndpointFactory::MODE_PRODUCE);

        $endpoint->produce($exchange);
    }
public function deferExchangeMessage ( ExchangeEnvelope $ deferredExchange , $ endpointURI = null ) { $ exchange = new Exchange ( $ deferredExchange ) ; if ( ! $ endpointURI ) { $ oldExchange = $ deferredExchange -> getBody ( ) ; $ endpointURI = $ oldExchange -> getHeader ( Exchange :: HEADER_FROM ) ; } $ endpoint = $ this -> getEndpointFactory ( ) -> createEndpoint ( $ endpointURI , EndpointFactory :: MODE_PRODUCE ) ; $ endpoint -> produce ( $ exchange ) ; }
Defer and ExchangeEnvelope to an endpoint
If no endpoint is defined then look inside the envelope for the exchange and use original endpoint.

@param ExchangeEnvelope $deferredExchange
@param null             $endpointURI
Defer and ExchangeEnvelope to an endpoint If no endpoint is defined then look inside the envelope for the exchange and use original endpoint .