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

[dbal] Consumer never fetches messages ordered by published time #340

Closed
f7h opened this issue Jan 21, 2018 · 1 comment
Closed

[dbal] Consumer never fetches messages ordered by published time #340

f7h opened this issue Jan 21, 2018 · 1 comment

Comments

@f7h
Copy link
Contributor

f7h commented Jan 21, 2018

The database column "priority" is defined as NOT NULL if you use the DbalContext class to generate the schema.

The default priority of a DbalMessage is 0.

The fetchPrioritizedMessage() method from the DbalConsumer class fetches messages where the priority IS NOT NULL, so all of them.

Consequently, fetchMessage(), which fetches the oldest message first, is never called as long as there are any messages left in the queue.

The priority column should be nullable and the default priority should also be null in my opinion.

@makasim
Copy link
Member

makasim commented Jan 22, 2018

@f7h would you like to send us a PR?

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