Interface IComplianceSubscription

All Superinterfaces:
com.persequor.extension.subscription.ISubscriptionExtension, com.persequor.extension.subscription.ISubscriptionProcessor
All Known Implementing Classes:
ComplianceSubscription, ComplianceSubscriptionProcessor, ResponseBasedComplianceSubscription

public interface IComplianceSubscription extends com.persequor.extension.subscription.ISubscriptionExtension
  • Method Details

    • processSingle

      ComplianceProcessResponse processSingle(com.persequor.event.Event event)
      Here your subscription processes the event. This method is called asynchronously.

      Use the ComplianceResponseFactory to construct the wanted response. Here are the types of responses currently supported :

      - Should the event not be ready yet (other data is missing) you can push the event back for later processing by returning a RetryComplianceResponse having its action being 'RETRY'.

      - Returning a FailComplianceResponse will place the event(s) in issues. Here an operator must manually push them back into the subscription queue, or delete them in which case they never get processed by this subscription.

      - Returning a BasicComplianceResponse will store the reply provided with the response.

      - Returning a NotApplicableComplianceResponse will store a NOT_APPLICABLE status. If a reply is provided with the response, the statusReason will be picked up.

      - Returning null is also allowed, in which case nothing will happen.

      Returns:
      The response generated from the result of submitting the event to the compliance repository along with the action to be taken
    • getComplianceRepositoryId

      String getComplianceRepositoryId()
      Returns:
      Name that uniquely identifies the compliance repository
    • getMessageType

      IMessageType getMessageType()
      Returns:
      Type of your subscription eg. utilisation, TPD 31
    • afterStorageHook

      default void afterStorageHook(com.persequor.event.Event event, ComplianceRepositoryReply reply)
      Hook to perform some after-storage logic, for example re-indexing the event in Elastic
      Parameters:
      event - the event that has been processed
      reply - the compliance reply saved
    • postProcessingHook

      default void postProcessingHook(com.persequor.event.Event event, ComplianceProcessResponse response)
      Provides a hook for adding post processing logic, e.g. for dispatching to a secondary subscription or similar. Note that the inputs are not intended for modification/enrichment, but rather for triggering an action after all regular processing of the event has finished.
      Parameters:
      event - The processed event
      response - The processing result