Skip to content

feat: Register IEventOutbox as SQLiteEventOutbox in AddSQLiteOutbox() #232

@samtrion

Description

@samtrion

User Story

As a developer using SQLite with Pulse, I want IEventOutbox to be registered as SQLiteEventOutbox when AddSQLiteOutbox() is configured, so that events stored via IEventOutbox share the same SQLite connection and transaction as my business logic.


Background

Mirrors the SQL Server (#230) and PostgreSQL (#231) fixes. SQLiteEventOutbox exists but is not registered in DI, causing applications to fall back to the default OutboxEventStore.


Requirements

  • Update SQLiteEventOutbox to accept SQLiteOutboxOptions as constructor parameter; open SqliteConnection from ConnectionString; enlist in active SqliteTransaction from IOutboxTransactionScope when present.
  • In AddSQLiteOutbox(), register IEventOutboxSQLiteEventOutbox as Scoped.
  • Add AddSQLiteOutboxTransactionScope<TUnitOfWork>() convenience extension.
  • Update unit tests for SQLiteEventOutbox to cover the new constructor path.

Acceptance Criteria

  • After AddSQLiteOutbox(), resolving IEventOutbox returns SQLiteEventOutbox.
  • SQLiteEventOutbox enlists in the active SqliteTransaction from IOutboxTransactionScope when present.
  • SQLiteEventOutbox opens its own connection when no IOutboxTransactionScope is active.
  • AddSQLiteOutboxTransactionScope<TUnitOfWork>() registers the UoW as Scoped.
  • Unit tests cover: with active transaction scope, without transaction scope.

Metadata

Metadata

Labels

type:featureIndicates a new feature or enhancement to be added.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions