Dispatcher
Dispatches events to registered listeners. Used for in-transaction (in-process) event processing.
Source code in event_sourcery/_event_store/subscription/in_transaction.py
dispatch(*raws)
Dispatches one or more raw event records to all registered listeners.
Deserialization is deferred until matching listeners are found, so that no-listener hits on encryption-enabled backends do not engage the (possibly stubbed) serde.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*raws
|
RecordedRaw
|
One or more events to dispatch. |
()
|
Source code in event_sourcery/_event_store/subscription/in_transaction.py
dispatch_prepared(prepared)
staticmethod
Invokes listeners for records that were already deserialized.
Source code in event_sourcery/_event_store/subscription/in_transaction.py
prepare(*raws)
Deserializes records with matching listeners without invoking them.