Hi,

It is possible to be both a publisher and subscriber on the same topic. If
you are trying to apply a request/response based communication model in a
pub/sub or queueing environment, then you need to use Correlation Id's to
match the responses to a given request. More importantly, you need to use a
response queue or topic to ensure the response is sent and received by the
right entity (client).

However the bigger point is, pub/sub is not generally used for
request/response scenarios. Queues are more preferable since pub/sub
involves dispatch of a single message to several subscribers each of whom
may independently act on the message oblivious to the activities of other
subscribers causing unnecessary duplication of message handling.

Also responses will be dispatched to all subscribers unless you use response
topics and control the clients subscribing to the response topic, causing
flooding in the environment. This is bad for scalability and seriously
damage performance. 

Hope this helps.

Cheers,

Ashwin...



-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
Progress Software Corporation
http://fusesource.com http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com.com
http://opensourceknowedge.blogspot.com 
---------------------------------------------------------
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/PubSub-with-multiple-responses-tp2806150p2806172.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to