Skip to content

FEAT: Implementation of transactional outbox.#96

Merged
CesarD merged 1 commit intomainfrom
feat/masstransit_outbox
Aug 29, 2025
Merged

FEAT: Implementation of transactional outbox.#96
CesarD merged 1 commit intomainfrom
feat/masstransit_outbox

Conversation

@CesarD
Copy link
Collaborator

@CesarD CesarD commented Aug 28, 2025

Description

Implementation of transactional outbox with MassTransit

Related Issue

Closes #95

How Has This Been Tested?

Existing test suite covers it.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a transactional outbox pattern using MassTransit's Entity Framework Core integration to ensure reliable message publishing alongside database transactions.

Key changes:

  • Adds MassTransit Entity Framework Core outbox configuration to both API and Worker projects
  • Updates database schema with outbox and inbox state tables through EF Core migrations
  • Modifies message publishing order to occur before database save operations

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Program.cs (Worker) Configures Entity Framework outbox with SQL Server and duplicate detection
Program.cs (API) Adds outbox configuration with disabled inbox cleanup for API project
AppDbContext.cs Adds transactional outbox entities to the model
CreateProduct.cs Reorders operations to publish messages before saving entities
Directory.Packages.props Adds MassTransit.EntityFrameworkCore package dependency
Migration files Adds database tables for outbox/inbox state management
Files not reviewed (1)
  • src/Content/Backend/Solution/Monaco.Template.Backend.Application/Persistence/Migrations/20250828213955_Init.Designer.cs: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedmasstransit.entityframeworkcore@​8.5.29810089100100

View full report

@CesarD CesarD merged commit 3159349 into main Aug 29, 2025
2 checks passed
@CesarD CesarD deleted the feat/masstransit_outbox branch August 29, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEATURE: Implement Transactional Outbox with MassTransit

3 participants