Skip to content

[Host.Outbox.PostgreSql] Outbox provider for PostgreSql#393

Merged
zarusz merged 2 commits intozarusz:masterfrom
EtherZa:feature/392-host-outbox-progresql
Apr 18, 2025
Merged

[Host.Outbox.PostgreSql] Outbox provider for PostgreSql#393
zarusz merged 2 commits intozarusz:masterfrom
EtherZa:feature/392-host-outbox-progresql

Conversation

@EtherZa
Copy link
Contributor

@EtherZa EtherZa commented Apr 15, 2025

A Host.Outbox.PostgreSql[.DbContext] implementation of the Host.Outbox.Sql[.DbContext] provider for use with PostgreSQL.

Outbox message by reference

#392 Host.Outbox.PostgreSql

  • Added SlimMessageBus.Host.Outbox.PostgreSql and SlimMessageBus.Host.Outbox.PostgreSql.DbContext as flavours of the Sql Server implementations
  • Updated Sample.OutboxWebApi to select the target provider via enum selection
  • Updated documentation to include references to both implementations
  • Refactored SqlOutboxTemplate and its consumers to use an interface instead of a direct reference to the class

-sorry, this is a fairly chunky submission

Signed-off-by: Richard Pringle <richardpringle@gmail.com>
@EtherZa EtherZa force-pushed the feature/392-host-outbox-progresql branch from e6e3841 to eefca03 Compare April 15, 2025 18:45
@zarusz
Copy link
Owner

zarusz commented Apr 15, 2025

@EtherZa As always — fantastic contribution and solid direction!

When you get a chance, could you take a quick look at the SonarCloud warnings? Some of them might be false positives, but a quick review could help fine-tune things.

I'll be doing a more in-depth review over the next few days.

Thanks again for your great work!

@zarusz zarusz self-requested a review April 15, 2025 20:30
@EtherZa EtherZa force-pushed the feature/392-host-outbox-progresql branch 4 times, most recently from 40841af to b496cfd Compare April 16, 2025 02:55
@EtherZa
Copy link
Contributor Author

EtherZa commented Apr 16, 2025

I've gone through the SonarCloud complaints and resolved most of them while hiding the SQL injection concern.

The outbox table/schema names are being injected into the migration scripts, which does pose a potential injection point, but as it would need to be manipulated by the same audience that uses it, I feel that the concern becomes moot (SQL Server migration has a similar implementation).

Code duplication is due to "copying" code from the SQL outbox implementation. I looked at abstracting this into a common library, but the SQL transport stub makes it a little scrappy. I chose to rather "reinvent the wheel" in the PostgreSql libs to keep the code together with minor tweaks where required.

@EtherZa EtherZa force-pushed the feature/392-host-outbox-progresql branch 5 times, most recently from b95ac8f to 9068205 Compare April 16, 2025 06:53
@zarusz zarusz added this to the 3.2.0 milestone Apr 16, 2025
Copy link
Owner

@zarusz zarusz left a comment

Choose a reason for hiding this comment

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

@EtherZa looks good!

Do you want to update the top level README.md with the plugin reference (in the table), and add a Postgre outbox call out in the README.md meant for NuGet packages? I could also add that here myself.

@EtherZa EtherZa force-pushed the feature/392-host-outbox-progresql branch from 9068205 to 758d404 Compare April 18, 2025 06:11
@EtherZa
Copy link
Contributor Author

EtherZa commented Apr 18, 2025

Thanks @zarusz. I have made the two changes and updated the README.md. Please let me know if there is anything else you would like tweaked, otherwise it's good to go from my end.

Signed-off-by: Richard Pringle <richardpringle@gmail.com>
@EtherZa EtherZa force-pushed the feature/392-host-outbox-progresql branch from 758d404 to 0cf03e7 Compare April 18, 2025 06:56
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@zarusz zarusz merged commit 2a363b3 into zarusz:master Apr 18, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants