Interface SynchronizationRouteAware


public interface SynchronizationRouteAware
An extension to Synchronization which provides route awareness capabilities.
  • Method Details

    • onBeforeRoute

      void onBeforeRoute(Route route, Exchange exchange)
      Invoked before the Exchange is being routed by the given route.

      Notice if the exchange is being routed through multiple routes, there will be callbacks for each route.

      Important: this callback may not invoked if the SynchronizationRouteAware implementation is being added to the UnitOfWork after the routing has started.

      Parameters:
      route - the route
      exchange - the exchange
    • onAfterRoute

      void onAfterRoute(Route route, Exchange exchange)
      Invoked after the Exchange has been routed by the given route.

      Notice if the exchange is being routed through multiple routes, there will be callbacks for each route.

      This invocation happens before these callbacks:

      This allows custom logic to be executed after all routing is done, but before the Consumer prepares and writes any data back to the caller (if in InOut mode).
      Parameters:
      route - the route
      exchange - the exchange