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

Exclude job_id from the message body when calculating message_deduplication_id for ActiveJob #457

Closed
nathanpalmer opened this issue Jan 11, 2018 · 2 comments

Comments

@nathanpalmer
Copy link

I tested out a FIFO queue with deduplication enabled it didn't prevent duplicate jobs from getting submitted. This is while using ActiveJob which assigns a unique job_id to each message and thus makes the body different.

Has there been any discussion about removing the job_id when processing the message_deduplication_id while using ActiveJob?

@phstc
Copy link
Collaborator

phstc commented Jan 11, 2018

hi @nathanpalmer

Good point on the job_id. Removing the job_id from the message_deduplication_id seems to make sense.

job_id is supposed to be unique per perform_later, right?

@nathanpalmer
Copy link
Author

Yeah, that's right. Simply a uuid that gets generated upon initialization, changes for each perform_later like you said.

https://github.com/rails/rails/blob/0f8568f58d36a543f9eb423171f42731784b34af/activejob/lib/active_job/core.rb#L73

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