Skip to content

AP-5046 outbox-core package for transactional outbox pattern - #204

Merged
kibertoad merged 31 commits into
kibertoad:mainfrom
kamilwylegala:AP-5046-outbox-core
Sep 16, 2024
Merged

AP-5046 outbox-core package for transactional outbox pattern#204
kibertoad merged 31 commits into
kibertoad:mainfrom
kamilwylegala:AP-5046-outbox-core

Conversation

@kamilwylegala

@kamilwylegala kamilwylegala commented Sep 4, 2024

Copy link
Copy Markdown
Collaborator

Added few classes in outbox.ts that cover:

  • Periodic job that runs every 1 sec to process entries from outbox storage
  • OutboxStorage interface -> next step, implement prisma

I didn't decide to implement lockedUntil for ACKed entries. Now the code that handles entries is wrapped with try-catch, in case of errors we always end up with FAILED status, next execution will pick up such entries until retry count max is reached.

@kamilwylegala
kamilwylegala marked this pull request as draft September 4, 2024 10:22
@kamilwylegala kamilwylegala changed the title [WIP] AP-5046 outbox-core package AP-5046 outbox-core package for transactional outbox pattern Sep 5, 2024
@kamilwylegala
kamilwylegala marked this pull request as ready for review September 5, 2024 11:48
@kamilwylegala

Copy link
Copy Markdown
Collaborator Author

@kibertoad Ready for review.

Comment thread packages/outbox-core/lib/outbox.ts Outdated
Comment thread packages/outbox-core/lib/outbox.ts Outdated
Comment thread packages/outbox-core/lib/outbox.ts Outdated
Comment thread packages/outbox-core/lib/outbox.ts Outdated
Comment thread packages/outbox-core/lib/outbox.ts Outdated
Comment thread packages/outbox-core/package.json
Comment thread packages/outbox-core/package.json Outdated
Comment thread packages/outbox-core/package.json
Comment thread packages/outbox-core/lib/outbox.ts
Comment thread packages/outbox-core/lib/outbox.ts Outdated
Comment thread packages/outbox-core/lib/outbox.ts Outdated
Comment thread packages/outbox-core/README.md
Comment thread packages/outbox-core/lib/accumulators.ts Outdated
Comment thread packages/outbox-core/lib/accumulators.ts Outdated
Comment thread packages/outbox-core/lib/outbox.spec.ts Outdated
Comment thread packages/outbox-core/lib/outbox.ts Outdated
Comment thread packages/outbox-core/lib/storage.ts

@kibertoad kibertoad left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Very impressive work, thank you so much!

@kamilwylegala

Copy link
Copy Markdown
Collaborator Author

Very impressive work, thank you so much!

Thank you, let me work on the test pipeline now 😁

@kamilwylegala

Copy link
Copy Markdown
Collaborator Author

Ready for release @kibertoad 🎉

@jmontoyaa

jmontoyaa commented Sep 16, 2024

Copy link
Copy Markdown

@kibertoad Could we merge this one? 👉👈

@kibertoad
kibertoad merged commit 1faf89b into kibertoad:main Sep 16, 2024
@kibertoad

Copy link
Copy Markdown
Owner

@jmontoyaa done. should I publish a new version, or we still need to implement anything for the outbox?

@jmontoyaa

Copy link
Copy Markdown

Thanks! 🙏 A new version, is not needed at the moment. There's still this PR in draft about the prisma adapter #208

I will mark ticket AP-5046 as done.

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.

3 participants