publishAndWait and Reply problem.

Hi Folks,

I have a scenario where i am using publishAndWait to publish DocumentA and wait for 1hr in serviceA.
Replying with DocumentB in serviceB.

But the twist is Service B should not be invoked by docA. But by some other JMS message.And still it should be sending the reply documentB and service A should receive that. Is it possible?

Using publishAndWait to wait this long is not a good idea.

If service B isn’t subscribing to docA then this won’t work.

Yes. We got to know. But after subscribing also, we cant use that reply. Because reply will always send volatile documents. Any thought on this?

Use of volatile document in a request/reply scenario is perfectly acceptable. If the reply is lost for some reason, then the requestor simply requests it again. There is no need to make a reply document guaranteed.