Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve pub subs #22

Merged
merged 4 commits into from
May 17, 2024
Merged

Improve pub subs #22

merged 4 commits into from
May 17, 2024

Conversation

anxolin
Copy link
Contributor

@anxolin anxolin commented May 17, 2024

This PR fixes a bunch of issues related to the notifications publisher and consumer

Publisher

  • Fixed main loop, it was not working as expected
  • Keep connection alive, handle closing of the queue
  • Handle error posting the message (tries to re-attempt later when the connection is established). Before it was loosing the message. Still needs improvement, but requires an API change
  • Generaral refactors and logging improvements
  • Recover from errors

Consumer

  • Fixed main loop, it was not working as expected
  • Keep connection alive, handle closing of the queue
  • Generaral refactors and logging improvements
  • Recover from errors

Test

  • start queue with docker
  • start producer with NX
  • start consumer with NX
  • Add a notification in the CMS

You can try to see how if we kill the queue, both services notice it, and will periodically re-attempt to connect

Copy link

vercel bot commented May 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
cow-web-services ❌ Failed (Inspect) May 17, 2024 2:42pm

@anxolin anxolin force-pushed the improve-pub-subs branch from 90490b8 to 48e0601 Compare May 17, 2024 14:41
@anxolin anxolin changed the base branch from api/about to develop May 17, 2024 14:41
@anxolin anxolin merged commit 62b97e2 into develop May 17, 2024
2 of 3 checks passed
@alfetopito alfetopito deleted the improve-pub-subs branch May 20, 2024 08:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant