I have a JMS producer publishing the message to the topic as shown below

<jms:provider service="orderservice:orsjmsprovider"
endpoint="orsProvider"
destinationName="topic/ORS/Order"
replyDestinationName="topic/ORS/Order"
connectionFactory="#connectionFactory"
pubSubDomain="true"
/>

I also have a JMS durable consumer with target service as JMS producer as
shown below

<jms:consumer service="orderservice:orsjmsconsumer"
endpoint="jms"
targetService="orderservice:orsjmsprovider"
targetEndpoint="orsProvider"
destinationName="topic/ORS/Order"
durableSubscriptionName="FirstConsumer"
clientId="LOE-ORS-SubscriberId"
subscriptionDurable="true" 
connectionFactory="#connectionFactory" />

Now when I deploy the assembly, I cannot see the topic getting created once
the flow is initiated. I have the following flow

File Poller --> Bean (Do some validations on the file and send the results
to camel) -> Camel --> JMS provider (put the message into a topic)

I read earlier, that messages sent to a topic would not be persisted if
there is no consumer listening to it and so I had the durable JMS consumer
subscrbing to that topic. 

Still, I donot see the topic but when I run a standalone JMS client, I see
the topic getting created.

This is my client code

topicConnectionFactory = (TopicConnectionFactory)
context.lookup("TopicConnectionFactory");
topicConnection = topicConnectionFactory.createTopicConnection();
topicConnection.start();
topicSession = topicConnection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
topic = topicSession.createTopic("topic/ORS/Order");
topicSubscriber = topicSession.createDurableSubscriber(topic, clientId);

But I would like the client code to subscribe to that topic and receive the
messages published there.

What am I possibly doing wrong? Is this an issues with my flow?

-Subh


-- 
View this message in context: 
http://www.nabble.com/Subscribing-to-JMS-topic-from-a-remote-client-tp24156363p24156363.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to