Skip to content
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

Question about event deduplication #907

Open
1am opened this issue Sep 25, 2024 · 2 comments
Open

Question about event deduplication #907

1am opened this issue Sep 25, 2024 · 2 comments

Comments

@1am
Copy link

1am commented Sep 25, 2024

Hello,

Is there any way to deduplicate events being pushed to the queue? I've found some dedup ocurrences but I'm not yet clear if this can be used from the client side? I have a protection mechanism for double task execution for same inputs but am looking if it could be handled on the Hatchet level when adding items.

Best regards

@abelanger5
Copy link
Contributor

Hi @1am, this can be set from the client side by added a key called dedupe to the additional metadata of the workflow, and then setting the value to the field you'd like to dedupe on.

We're working on exposing this as a better deduplication API (including a count for the # of occurrences) using expression-based syntax parsing for deduplication keys. Will share an update here when we tackle that.

@1am
Copy link
Author

1am commented Sep 27, 2024

Thank you @abelanger5 This sounds great but I can't seem to find how to specify dedup in metadata of the workflow when using RegisterWorkflow. I've started with similar approach as in in examples/simple/main.go Could you point me to how to call createNewWorkflowRun which seems to deal with dedupe key?

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

No branches or pull requests

2 participants