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

Honor TryCount in PublisherQueue FIFO list #472

Open
selbitschka opened this issue Jan 15, 2024 · 2 comments
Open

Honor TryCount in PublisherQueue FIFO list #472

selbitschka opened this issue Jan 15, 2024 · 2 comments

Comments

@selbitschka
Copy link

selbitschka commented Jan 15, 2024

Currently entries of the publisher queue are strictly handled by FIFO. This is reflected in the findDataByPublisherIdAndStatus which use the select

SELECT a FROM PublisherQueueData a WHERE a.publisherId=:publisherId AND a.publishStatus=:publishStatus ORDER BY a.timeCreated DESC

to get data. This means that newest entries are returned first.

Now if you have 10 or more "new" entries in your queue which cannot be published no "older" entry will ever be published using the queue since shouldBreakPublishingOperation in PublisherResult will always fail after the first 10 entries.

My suggestion now is to honor the trycounter in the select and try to publish entries with lower trycounter first. This would lead to a select like

SELECT a FROM PublisherQueueData a WHERE a.publisherId=:publisherId AND a.publishStatus=:publishStatus ORDER BY a.tryCounter, a.timeCreated DESC

This would allow to publish entries with lower trycounter first and do not stall the queue if the newest 10 entries are failing.

@primetomas
Copy link
Collaborator

Thank you, that sounds like a very good suggestion. I will create a ticket and some core devs will look at it. I'll revert back here.

@primetomas
Copy link
Collaborator

Internal reference: https://jira.primekey.se/browse/ECA-12220

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