Filtering Events

When the table listener is being created you can optionally specify a filter string to further narrow the scope of events received.

The filter string specifies the criteria that events must match in order for them to be delivered to the table listener. The filter is equivalent to the WHERE clause of an SQL query and is applied to both the current and previous values for the row that has changed. If either the current or previous value matches the filter, then the event is delivered to the listener.

For example, in a table containing customer data with a column called state, the filter state = “CA” limits the events delivered to only those involving customers in California.

Listening to Specific Event Types

When the table listener is being created, you can optionally provide a Properties object containing a list of event types that restrict the listener to only receiving events of those types. This feature is commonly used to listen to expired events, but to ignore any PUT or DELETE events that occur on the table.

The property name is TIBDG_LISTENER_PROPERTY_STRING_EVENT_TYPE_LIST and the property value should be a comma separated list of string event types. The valid choices are any combination of "put", "delete", and "expired". For example, to listen to only expired events, you would use a property value of "expired". To listen to both expired events and delete events, you would use a property value of "delete,expired".