Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I was wondering if it's possible to deduplicate events when publishing them to a pg-boss queue.
My current use case involves receiving messages from AWS SQS and then publishing them to multiple pg-boss queues in a fan-out fashion (using the
boss.publish()
andboss.subscribe()
methods.AWS SQS doesn't guarantee exactly-once message delivery and that means that I could possibly publish the same message multiple times.
I have several ideas on how to implement this:
create_queue
anddelete_queue
which means I can't call those functions from my Prisma transaction either.(id, name)
and set theid
to be the same as the message id from AWS. I was looking through some existing issues and came across this comment: Question regarding adding additional indexes #525 (comment) talking about not making UNIQUE indexes, which led me to believe that this isn't the right approach either.What would you suggest?
Beta Was this translation helpful? Give feedback.
All reactions