Skip to main content

Product: OpenFusion Notification Service

Version: ALL

 

Description:

How to make events persistent?

 

Resolution:

There are a number of stages to this:

  1. You need to make sure the Notification Service will store events persistently by setting the EventReliablity QoS to Persistent.
  2. You need to make sure that connections are handled persistently by setting the ConnectionReliability QoS to Persistent. Note: Setting EventReliability to Persistent and ConnectionReliability to BestEffort will throw an UnsuppportedQoS exception as this combination has not meaning.
  3. Finally you need to implement your client consumers to be persistent consumer objects with respect to the Notification Service. If they are not, then when your client is restarted it is effectively a new CORBA object and will only receive any events generated after it is connected.

The various cases are outlined below:

1. Supplier Generating Events / No Consumer Connected
These events are persistently stored but deleted when delivery is attempted. If you require events to be stored under these circumstances then the OpenFusion Logging Service, which is layered on top of the Notification Service, may be more appropriate.

2. Supplier Generating Events / Consumer Connected
These events are persistently stored until delivered, if the Notification Service is stopped and restarted the outstanding events are sent to the consumer on the restart. However if it is the consumer that is disconnected the behaviour will be dependant on whether the consumer object reference is transient or persistent.

3. Transient Consumer Disconnected
The next event transmission by the proxy will fail, it will know that the consumer reference is not persistent i.e. the object has ceased to exist and will not be re-created with that reference. The events will not be persistently stored and the associated proxy will be deleted. Again the Logging Service may be more appropriate to your needs if you require persistent events under these circumstances.

4. Persistent Consumer Disconnected
The next event transmission by the proxy will fail, it will know that the consumer reference is persistent i.e. the object will be re-created with the same reference. The events will be persistently stored and forwarded to the consumer when it comes back online.


#OpenFusion
#KnowledgeDocs