Guaranteed delivery (GD) and persistent subscribe pattern (PSP) are delivery mechanisms that support high availability.
GD and PSP ensure that data continues to be processed when:
SAP recommends that you use guaranteed delivery rather than persistent subscribe pattern if possible. GD uses CPU and memory resources more efficiently and is more flexible from a development standpoint because it does not force you to decide how many subscribers will be supported when you set it up. However, you might prefer PSP if:
Guaranteed delivery (GD) uses log stores to ensure that a GD subscriber registered with a GD stream or window receives all the data processed by that stream or window even if the client is not connected when the data is produced. GD is supported on streams and windows (not on delta streams) and each GD stream or window requires a log store.
You can specify GD support for a window in Studio or in the CCL. (See the SAP Event Stream Processor: Studio Users Guide for Studio details or the SAP Event Stream Processor: CCL Reference for CCL details.) A GD window supports multiple GD subscribers as well as both GD and non-GD subscriptions. To use GD:
You can subscribe to the metadata streams using the C++ SDK, the Java SDK, or the .NET SDK. You can also monitor the streams yourself using streamingsubscribe (see the SAP Event Stream Processor: Utilities Guide) or the Studio Server view. Event Stream Processor stores data from the _ESP_GD_Sessions metadata stream in a special metadata log store so it will be available after a crash.
Consistent recovery mode ensures that if the server restarts, it recovers the state of all streams and windows in a project to the last successful checkpoint state—provided you have followed the rules related to assigning streams and windows to log stores. Consistent recovery is achieved by checkpointing all log stores atomically. If any checkpoints fail (which happens, for example, when the server shuts downs in the middle of a checkpoint or there is not enough space in the log stores), Event Stream Processor rolls all the log stores back to the last successful checkpointed state. See the SAP Event Stream Processor: Developer Guide for more information on consistent recovery.
Use the Auto Checkpoint project option to set the number of input transactions that trigger a checkpoint. More frequent checkpoints reduce the risk of data loss; less frequent checkpoints reduce the burden on system resources and may improve performance. Note that the frequency N you set with this option only ensures that a checkpoint happens at least every N transactions. Checkpoints might happen at other times if the system decides that it is necessary or if a publisher issues a commit when the server is running in consistent recovery mode.
Input adapters support persistent subscribe pattern (PSP) using facilities provided by the data source. Output adapters use PSP directly.
The WebSphereMQ Input and Output adapter, all JMS Input and Output adapters, and the TIBCO Rendezvous adapter all support PSP. These adapters have specific PSP and GD parameters that are unique to them. Examples for enabling PSP in one of the JMS CSV Output adapters and the WebSphere Output adapter are located in <STREAMING_HOME>/examples/ccl/JmsOutBoundAdapterWithGDSupport and <STREAMING_HOME>/examples/ccl/WsmqOutBoundAdapterWithGDSupport respectively.