Interface ISubscriptionService


public interface ISubscriptionService
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method allows you to split processing of a list of events into multiple subscription handlers, in order to support the case where events need to go to two different endpoints, but still has some common processing too.
  • Method Details

    • process

      This method allows you to split processing of a list of events into multiple subscription handlers, in order to support the case where events need to go to two different endpoints, but still has some common processing too. An example of this could be: A -> B \-> C Where A is a processor which handles "expensive" contextual validation for both B and C, and B and C sends of to external systems. subscriptionService.process(p -> { p.process(events, SubB.class); p.process(events, SubC.class); }); Note, that in certain SAGA modes the call to this method can be blocking and wait until all the subprocesses are finished. In case Saga is run in non-blocking (asynchronous) mode, it can be important to call `process` once pr. method context, as this method keeps all the invocations within a transaction. Otherwise, we risk to only have some process registrations being actually run, if for example an error occurs on the second invocation.
      Parameters:
      consumer - Use this consumer to process events