The log window is a Flex operator that is assigned to a log store and is the centre of the guaranteed delivery (GD) mechanism.
For persistent subscription using persistent subscribe pattern (PSP), attach the output adapter to a log window instead of a stream of interest. The stream definition for the log window contains all the columns belonging to the stream of interest, plus two additional columns. These additional columns are the gdKey (long) and the gdOpcode (integer).
The gdKey is a constantly increasing value that uniquely identifies every event, regardless of the opcode in the stream of interest. This serves as the key for the log window. The gdOpcode is the operation code (for example, INSERT, UPDATE, or DELETE) of the event that occurs in the stream of interest.
The method associated with the truncate window is responsible for ensuring that the data in the log window does not grow indefinitely. Every time an event occurs on the truncate window, this method deletes all events in the log window that has a gdKey less than or equal to the provided gdKey, and provided that the purge data flag is set to true.