You have to set the JMSReplyTo header if you want to specify a dedicated
destination [1]. The producer template has methods to specify additional
headers [2]. The camel context is the factory for the producer template. If
the Camel context is down, you cannot send/receive messages.

[1] http://camel.apache.org/jms.html
[2]
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/ProducerTemplate.html

Best,
Christian

On Wed, Oct 3, 2012 at 10:50 AM, zuff <bhtan1...@live.com> wrote:

> Hi All,
>
>  Before I'm able to confirm whether our team are going to use temp-topic or
> temp-queue. I would like to seek further design advise as it seems to give
> me some issues right now.
>
>
> package org.learning.messaging;
>
> public interface MessageSender
> {
>      public Destination sendRequest(String Destination, LearningMessage
> message);
> }
>
>
> public class CamelSender implements MessageSender
> {
>      .....
>
>      public Destination sendRequest(LearningMessage message)
>      {
>               template.requestBody(String Destination, LearningMessage
> message);
>               // how do i return the JMSReplyTo ?
>               // but it seems to require a camelcontext to be running and
> producing an OUT message, which can take quite long.
> I'm hoping to receive the JMSReply to as soon as it's available.
> (P.S:  I have an concurrently consumer on the webapps that recieving the
> request and displaying on the screen, the screen had already received the
> JMS messaeg, but this part had not received an response yet)
>
> I'm hoping to be able to send the message and getting the JMSReplyTo even
> if
> the camelContext isnt running, as that server is down, but the ActiveMQ is
> still running (durable).
> Am i misunderstanding something here? Do I need to provide that JMSReplyTo
> for my case?
>      }
> }
>
>
>
> __________________________________________________________________
> on a separate iceface EAR project
>
> package org.learning.beans;
>
> public class SampleBeans
> {
>           public MessageSender sender;
>           public LearningMessage message;
>
>             public void submitRequest(ActionEvent event)
>             {
>                  Destination destination =
> sender.sendRequest("activemq:topic:request",message);
>             }
> }
>
> Question:   I'm hoping to be able to create a route here to handle the
> JMSReplyTo but without the destination being returned, I'm unable to
> continue. Please kindly advise where I goes wrong.
> _______________________________________________
>
>
> A "rough" view of my webapps UI
>
>
> -----------------------------------------------------------------------------------------------
>           UI Request Details Portion                     |         Message
> result from the template.
>                                                                   |
> e.g. Message Sent. Job ID: XXX. JMSReplyTo:  XXX
>
> -----------------------------------------------------------------------------------------------
>    Message Request Received
> e.g. Message Received Job ID: XXX.
>
> -----------------------------------------------------------------------------------------------
>   Job Completed  (C)
> e.g. Job Completed Job ID: XXX.
>
> -----------------------------------------------------------------------------------------------
>   My Job Completed      (This is the part where I hoped the dynamic
> temp-topic/temp-queue come in,
> so that they are the only consumer)
> Although I compare the message I recieved from (C), I would prefer a more
> direct method for my beans to receive the response.
>
> e.g. Job Completed Job ID: XXX.
>
>
> Thanks and Best Regards,
> Zuff
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Best-Practise-for-Dynamic-Topic-in-Ear-Project-tp5720288p5720435.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Reply via email to