Home

 

Retained publications

When a publication specifies that it is to be retained, any previously retained publication for this stream and topic combination is replaced, so that the information is always at the latest level. See Retained publications for information about retained publications.

Mixing retained and non-retained publications on the same topic in a stream is not recommended. If an application does this and publishes a non-retained publication, any previously retained publication is still retained.

It is not recommended for two or more applications to publish retained publications to the same topic and stream. If two applications do publish a retained publication about the same topic on the same stream simultaneously, it is difficult to determine which publication is retained. If these publishers use two different brokers, it is possible that different retained publications could be active at different brokers for the same topic and stream.

 

Expiry of retained publications

Use the Expiry field of the message descriptor (MQMD) of the publish message to set an expiry interval for a retained message.



 

Home