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

Implemented delayed jobs for RabbitMQ integration #9725

Merged
merged 1 commit into from Sep 21, 2021
Merged

Conversation

realLiangshiwei
Copy link
Member

Resolve #9724

@hikalkan
Copy link
Member

hikalkan commented Aug 11, 2021

As I understand, we are publishing delayed messages to another queue. Then how we consume that queue? Can you explain the implementation.

@realLiangshiwei
Copy link
Member Author

Yes,

I used RabbitMQ's message expiration and dead letter features.

The normal queue is bound to the delayed queue as a dead letter queue:

https://github.com/abpframework/abp/pull/9725/files#diff-58bc5b9360333e116200e7894e850259b7eb34f608e7cd67a00ee014829da188R39

When a delayed job is publishing, it is published to the delayed queue and an expiration time is set, after the message expires, it will move to the normal queue according to the dead letter routing, and then the application will consume it to implement delayed jobs

@hikalkan
Copy link
Member

Why we need this feature?

@realLiangshiwei
Copy link
Member Author

https://docs.abp.io/en/abp/latest/Background-Jobs#queue-a-job-item

Because the background job manager supports the delay parameter and in the default implementation it will delay the execution of the job, should we implement it in the RabbitMQ provider?

@hikalkan hikalkan merged commit 21d81b0 into dev Sep 21, 2021
@hikalkan hikalkan deleted the liangshiwei/rabbitmq branch September 21, 2021 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement delayed jobs for RabbitMQ integration
2 participants