From b16d513c0bb7fd2b76a43eccca6c50a27f02f476 Mon Sep 17 00:00:00 2001 From: Steven Lowenthal Date: Mon, 5 Jun 2017 16:43:49 +0200 Subject: [PATCH] Produce child to send camel results or failures directly to its parent (Producer Actor) instead of itself and then forward (cherry picked from commit 9ef6f136b12fe158eb2fc234e755da2db0f5ae7a) --- akka-camel/src/main/scala/akka/camel/Producer.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-camel/src/main/scala/akka/camel/Producer.scala b/akka-camel/src/main/scala/akka/camel/Producer.scala index 019d6b0dc4..1984f2897c 100644 --- a/akka-camel/src/main/scala/akka/camel/Producer.scala +++ b/akka-camel/src/main/scala/akka/camel/Producer.scala @@ -132,7 +132,7 @@ trait ProducerSupport extends Actor with CamelSupport { protected def produce(endpoint: Endpoint, processor: SendProcessor, msg: Any, pattern: ExchangePattern): Unit = { // Need copies of sender reference here since the callback could be done // later by another thread. - val producer = self + val producer = context.parent val originalSender = sender() val xchg = new CamelExchangeAdapter(endpoint.createExchange(pattern)) val cmsg = CamelMessage.canonicalize(msg)