Hi All To elaborate more, i have two applications. Each application can be either a publisher or subscriber. Let the names of the applications be A and B. Application A publishes messages for topic T1. Then Application B listens to topic T1. Here A is publisher for T1 and B is Subscriber for T1. every thing works fine. Application B publishes messages for topic T2. Application A listens to topic T2. Here too every thing works fine. Now both applications run simultaneously. Application A publishes T1 and Subscribes T2. Similarly Application B publishes T2 and Subscribes to T1. Here too every thing works fine. Now i am encountering a situation where in Application A should publish T1 and T2 and subscribe to T1 and T2 selectively. This applies for application B also. I would like to know whether this kind of set up is possible or not? Is there a way by which when Application A publishes T2 it should not subscribe to the the same topic T2. That means it should avoid loop back for topics. For more clarification if anybody need more information please let me know. I am using openJms as the Jms server. Two applications are normal java appliactions. T1 topis for new objects created in application A. T2 topics for new objects created in application B. Now T2 is subscribed in application A. Objects such saved can be modified in A application which should again get published and subscribed by B application. This is where i am facing difficulty. Thanks for any kind of inputs on this issue. S Venkatesh
Hi venkatesh seshagiri , Yes. I guess your situation can be handled by different Message Types. e.g. message type format- <<origin app>>_<<operation code>> 1. MessageType2 = A_ADDED - Objects possessed originally by A when published to T1, by A, has this message type 2. MessageType1 = A_MODIFIED - Objects possessed originally by B, modified by A, published to T2, by A, has this message type 3. MessageType4 = B_ADDEd - Objects possessed originally by B when published to T2, by B, has this message type 4. MessageType3 = B_MODIFIED - Objects possessed originally by A, modified by B, published to T1, by B, has this message type
There is a JMS option to recieve messages from the client that sent them. This is exactly what this is for. I forget the specifics because it's been so long, but take a look. It's specific to ClientID or the other ID (subscription ID). I can't remember. Either way, there IS a way to specify when creating the subscription.
Joined: Jun 05, 2003
Thanks for the inputs and thye are helpful I am still exploring how to make the publisher from not subscribing the same topic it has published.