All Known Implementing Classes:
NotificationDuplicationFilter.TableNameDuplicationFilter

public interface NotificationDuplicationFilter
Interface for extracting a unique key from the JSON representation of a Notification.getParameter() JSON to determine if the notification should be duplicate.
The key extracted from extractDuplicationKey(JsonNode) will be used inside MultiTableChangeListener for duplication checks across all Notification's returned in a single poll.
If an empty Optional is returned then the given notification won't be deduplicated.
If two or more Notification's in a given poll batch share the same duplication key, then only one of them will be published to the listeners registered with the MultiTableChangeListener
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Default filter to extract the "table_name" property from a JSON parameter.
  • Method Summary

    Modifier and Type
    Method
    Description
    extractDuplicationKey(com.fasterxml.jackson.databind.JsonNode notificationParameterJson)
    Extracts the duplication key from the given parameter JSON.
  • Method Details

    • extractDuplicationKey

      Optional<String> extractDuplicationKey(com.fasterxml.jackson.databind.JsonNode notificationParameterJson)
      Extracts the duplication key from the given parameter JSON.
      Parameters:
      notificationParameterJson - a JsonNode representing the JSON structure of the Notification.getParameter() JSON content
      Returns:
      an Optional containing the unique key if extraction was successful, otherwise an empty Optional if this filter doesn't support the given parameter JSON or no filtering is required This key will be used inside MultiTableChangeListener for duplication checks across all Notification's returned in one poll