Create generic interceptors which are called when:
an event is injected into a route
an event is sent to a processor
an event is has been processed by a processor
...
Possible realisation:
Different events are defined similar to typical node.js event handling, e.g. "eventInjected" etc. These events are sent to the registered interceptors. The processing should continue only if all interceptors are finished (callback). This is necessary for a delay interceptor.
Would error handling be a special type of interceptor?
Examples for interceptors:
DelayInterceptor: simply waits x milliseconds before the event is processed. Useful for debugging/development.
TracingInterceptor: logs events to console or database etc. (mongodb: capped collections)
Create generic interceptors which are called when:
Possible realisation: Different events are defined similar to typical node.js event handling, e.g. "eventInjected" etc. These events are sent to the registered interceptors. The processing should continue only if all interceptors are finished (callback). This is necessary for a delay interceptor.
Would error handling be a special type of interceptor?
Examples for interceptors:
For related concepts in Camel, see: http://camel.apache.org/delay-interceptor.html http://camel.apache.org/tracer.html http://camel.apache.org/debugger.html http://camel.apache.org/intercept.html