Interface IdempotentPersistenceNotificationConsumptionService

All Known Implementing Classes:
DefaultIdempotentPersistenceNotificationConsumptionService

public interface IdempotentPersistenceNotificationConsumptionService
Service responsible for enforcing idempotency checks on a message before executing an operation against the message.
Author:
Chris Kittrell (ckittrell)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    consumeNotification(com.fasterxml.jackson.databind.JsonNode entityJson, String handlerName, Consumer<com.fasterxml.jackson.databind.JsonNode> operation)
    Executes the provided operation if the JsonNode's idempotency check passes.
  • Method Details

    • consumeNotification

      void consumeNotification(com.fasterxml.jackson.databind.JsonNode entityJson, String handlerName, Consumer<com.fasterxml.jackson.databind.JsonNode> operation)
      Executes the provided operation if the JsonNode's idempotency check passes. If the check fails the idempotency check, then we'll quietly return to the caller without executing the operation.
      Parameters:
      entityJson - The JsonNode that is to be processed.
      handlerName - The name of the persistence notification handler. This value can be used to distinguish this notification consumption from that of a different handler.
      operation - The operation that is to be executed, without a return value
      Throws:
      Exception - if an unexpected exception is encountered while executing the operation