-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL support #7
Comments
Hey John (@jkears), Yeah I remember some initial conversations way back when.... and I'm really happy that the project has been useful & trouble-free for you 🚀. To answer your question, yes absolutely. The entire project is interface based using constructor injection for all dependencies. So you can certainly implement support for PostgreSQL (relatively easily). You are free to do this in your own project as needed, however it'd be awesome if you submit a PR with an implementation that doesn't have any unnecessary dependencies (e.g. use This I've been focused on a few of my other projects lately... but I'll be sure to get the Doc updates for this back on my todo list.... |
Here's some more technical info. for you to look into.... You shouldn't need to worry about the main logical processing handled by the Outbox Processor as all of that should be agnostic of the underlying mechanism(s). The main interface you would need to implement is The current concrete implementation of that using So with a new implementation such as
There are some additional nuanced things to take note of when implementing the Finally, once it's all implemented you could certainly call use it! But to make things really elegant it's best to sprinkle in some Extension methods to make things REALLY easy extending the PostgreSQL classes which we did for SQL Server Transaction and other classes: For more detailed investigation I recommend walking this message backwards 😁 (or outside to inner workings)... from the Extension methods that make everything super easy (using Default implementations) down into lower levels where you have full control over everything and can customize to your heart's content. Enjoy! |
@cajuncoding Thanks so much, I just saw your helpful instructions but was experimenting, and hit a bit of a wall and I am not sure how to handle it.
... that requires specific stored procedures within MSQL.
How should I handle this? |
I used PostGreSQL's advisory locks as a substitute of sp_getapplock which I hope can provide the same ...
The Release as per ...
Either way, it seems to process the events and pushes the OutboxItem to the Outbox Publisher which is Azure Service Bus, and thus I think I have it working ... once I know for sure I will share the changes which are not that much. Also I will like create the same for MySQL. |
This is closed but I will follow up later. |
Hi John, Yes I believe you are correct 👍 I quickly looked and the closest mechanism offered from Postgres SQL does appear to be explicit advisory locks. I think you may be able to simplify a bit by overriding/implementing the behavior in the lower level repository here: SqlTransactionalOutbox/SqlTransactionalOutbox.SqlServer.MicrosoftDataNS/SqlServerOutboxRepository.cs Line 217 in d33933f
Then you could return your own This would de-couple your code from the SqlAppLock library which is targeted at SQL Server. And then the framework should be able to handle everything. |
We have been using SQLTransactionalOutbox for a few years now and it works great, thank you so much for your contribution to the greater community!
We have a new domain scenario that requires integration with pgvector in PostgreSQL to generate and query OpenAI based embedding sets.
It would be ideal if we could create an adaptor for SQLTransactionalOutbox that could integrate with PostgreSQL using Npgsql.
Is that possible with your framework?
The text was updated successfully, but these errors were encountered: