Skip to content

⭐ IntegrationEventLogEF

Terrence Daniels edited this page Aug 20, 2026 · 2 revisions

Done. All 7 source files added and reviewed; tests/IntegrationEventLogEF.UnitTests covers all 5 applicable files, 17 passing tests.

IntegrationEventLogEF is the EF Core-backed transactional outbox for integration events — persisted alongside the business write in the same database transaction, then published separately. Notable findings across the full review:

  • EventStateEnum renamed to EventState — Microsoft's own .NET naming guidelines say not to suffix enum type names with Enum, a guideline this file violated in Microsoft's own sample. Its explicit integer values are pinned by a dedicated test, since they're persisted to a Postgres column through the outbox pattern.
  • The exact as-cast-can-return-null bug already fixed once in RabbitMQEventBus.DeserializeMessage recurred in IntegrationEventLogEntry.cs's own JSON deserialization — caught the second time because the first fix was still fresh.
  • Services/IntegrationEventLogService.cs (added after a deliberate pause to build out the testing strategy first): the interface's method got renamed/retyped to match a fork-internal-consistency fix made when IIntegrationEventLogService was first reviewed, Assembly.GetEntryAssembly() got null-checked, and a genuinely pointless Assembly.Load(assembly.FullName) re-resolution got removed.
  • IntegrationEventTypeResolver extracted from that service while writing its tests: the event-type-resolution logic (reflection-scan the entry assembly, match by short type name) was private static inside a generic class, recomputing per closed generic type despite not depending on the type parameter at all — and its hard dependency on Assembly.GetEntryAssembly() made a new collision-detection branch (two event types sharing a short name) untestable in isolation. Split into its own pure, non-generic class; closes a real silent-collision bug in the process (two colliding event types would have silently picked the first match).
  • A real dependency conflict surfaced trying to restore Identity.API later: Duende.IdentityServer.EntityFramework.Storage was pinned below what a sibling package required — unrelated to this project directly, but found because IntegrationEventLogEF's EF Core packages share the same central version file.

Full detail and commit hashes in todo.md's IntegrationEventLogEF and IntegrationEventLogEF.UnitTests sections.

Clone this wiki locally