Routing
Direct Source
- class DirectSource(app, pipeline, id=None, config=None)[source]
Bases:
SourceDescription: This source processes inserted event synchronously.
Direct Source
Internal Source
Internal Source methods
- InternalSource.put(context, event, copy_context=False, copy_event=False)[source]
Description: Context can be an empty dictionary if is not provided.
If you are getting a asyncio.queues.QueueFull exception, you likely did not implemented backpressure handling. The simpliest approach is to use RouterSink / RouterProcessor.
- async InternalSource.put_async(context, event, copy_context=False, copy_event=False)[source]
Description: This method allows to put an event into InternalSource asynchronously. Since a processing in the pipeline is synchronous, this method is useful mainly for situation, when an event is created outside of the pipeline processing. It is designed to handle situation when the queue is becoming full.
Context can be an empty dictionary if is not provided.
Router Mix In
- RouterMixIn.__init__()
Router Mix In methods
- RouterMixIn.unlocate(source_id)[source]
Description: Undo locate() call, it means that it removes the source from a cache + remove throttling binds
- Returns
??
Router Sink
- class RouterSink(app, pipeline, id=None, config=None)[source]
Bases:
Sink,RouterMixInDescription: Abstract Sink that dispatches events to other internal sources. One should override the process() method and call route() with target source id.
Router Processor
- class RouterProcessor(app, pipeline, id=None, config=None)[source]
Bases:
Processor,RouterMixInDescription: Abstract Processor that dispatches events to other internal sources. One should override the process() method and call route() with target source id.