Hi Jeroen, I think there is no other reason for that if statement apart from not sending responses when producer is configured to be one way.
What is the type of the ack that is being sent on a successful message delivery to the queue? Maybe acks could be handled specially in the routeResponse method? If after the change no tests are complaining then there surely was no other reason for that if statement. :) On Fri, Nov 7, 2014 at 11:39 PM, Jeroen Gordijn <[email protected]> wrote: > Hi all, > > I want to place a message on a JMS Queue with Akka-Camel. This works just > fine, however I want to be sure that the message was really placed on the > queue. The queue is oneway, so I do not expect any response from another > consumer. However, when I configure this in my code as oneway, the actor > sending to the producer does not get any notification that the message was > really delivered on the queue. > > ProducerSupport in Akka-Camel has the following code: > protected def routeResponse(msg: Any): Unit = if (!oneway) sender() > ! transformResponse(msg) > > This means that I do not get any response when oneway is configured. But > the endpoint does give feedback whether the message was delivered and this > is now lost. I solved it by putting the following code in my own producer: > > override protected def routeResponse(msg: Any): Unit = sender() ! > transformResponse(msg) > > Is there any reason for the if statement? Can anything go wrong when the > if statement is dropped in the akka-camel codebase? > > Thanks, > Jeroen > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Martynas Mickevičius Typesafe <http://typesafe.com/> – Reactive <http://www.reactivemanifesto.org/> Apps on the JVM -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
