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)
This commit is contained in:
Steven Lowenthal 2017-06-05 16:43:49 +02:00 committed by Patrik Nordwall
parent 8ca0aac2dc
commit b16d513c0b

View file

@ -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)