Broker

Hi,
If I publish a document from IS1 to another IS2 through a broker and if there are no subscribers for the document in that IS2, then where will the published document reside. Here when I published to the Broker, I can see the documents published as 1 but there is no corresponding trigger queue in the broker so where has been the published document sent to and how long will that document exist.
thanks in advance.

When you create a trigger, it actually creates a client queue on broker so if there is no trigger to subscribe the published document then it gets discarded. There is actually is property(Time to live) in developer which you can set for publishable documents. There are many post about this topic on this forum and you can also refer to “Publish_Subscribe_Developers_Guide” on advantage for further details.

Hi Subiksha

Page 22 of Publish-Subscribe Developers Guide 65 says
“If there are no subscribers for the document, the Broker returns an
acknowledgement to the publisher and then discards the document. If,
however, a deadletter subscription exists for the document, the Broker
deposits the document in the queue containing the deadletter subscription.”

IS wont give an error if document you are publishing doesnt have any broker client(queue). Broker would directly discard the document.

Jiten

Note that the TTL that Talha mentions applies only if there are subscribers. If there are no subscribers, the doc is discarded regardless of the TTL value.

If there are subscribers, the doc is placed into each subscriber queue. The TTL is evaluated when the subscriber(s) try to retrieve the “next” document. If the TTL has been exceeded, the doc is discarded and the next in the queue, if any, will be evaluated. Subscribers will never see docs whose TTL has been exceeded. Nor will they get an error.

Keep in mind too, that if a doc is placed on a queue and the subscriber never connects and retrieves documents, that doc will remain on queue forever. There is no thread/process that sweeps expired docs.

As always, someone please correct me if I’ve described something incorrectly.

Thanks