KurrentDBBackend
Bases: Backend
KurrentDB integration backend for Event Sourcery.
Source code in event_sourcery_kurrentdb/__init__.py
configure(client, config=None)
Sets the backend configuration for KurrentDB client and outbox behavior.
Allows you to provide a KurrentDBClient instance and an optional SQLAlchemyConfig. If no config is provided, the default configuration is used. This method must be called before using the backend in production to ensure correct event publishing and subscription reliability.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client |
KurrentDBClient
|
The KurrentDB client instance to use for backend operations. |
required |
config |
KurrentDBConfig | None
|
Optional custom configuration. If None, uses default SQLAlchemyConfig(). |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Self |
Self
|
The configured backend instance (for chaining). |
Source code in event_sourcery_kurrentdb/__init__.py
KurrentDBConfig
Bases: BaseModel
Configuration for KurrentDBBackend event store integration.
Attributes:
| Name | Type | Description |
|---|---|---|
timeout |
Seconds | None
|
Optional timeout (in seconds) for KurrentDB operations. Controls the maximum time allowed for backend requests. If None, the default client timeout is used. |
outbox_name |
str
|
Name of the outbox stream used for reliable event publishing. |
outbox_attempts |
PositiveInt
|
Maximum number of outbox delivery attempts per event before giving up. |