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

fix(broker): worker id based queues #60

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Conversation

bungle
Copy link
Member

@bungle bungle commented Jun 18, 2024

Summary

Switches from worker connection based broker queues to worker id based broker queues that makes it possible to retain events even when worker has not yet connected (on node startup), or worker is restarting/reloading.

Copy link

github-actions bot commented Jun 18, 2024

Luacheck Report

4 tests  +3   0 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   4 ❌ +3 

For more details on these failures, see this check.

Results for commit 2e9f34d. ± Comparison against base commit b8606c5.

♻️ This comment has been updated with latest results.

@bungle bungle force-pushed the feat/worker-id-based-queues-only branch 2 times, most recently from 32ffd13 to c0c7116 Compare June 18, 2024 16:28
@gszr gszr force-pushed the feat/worker-id-based-queues-only branch from c0c7116 to b8f3caa Compare June 18, 2024 18:06
@gszr gszr marked this pull request as ready for review June 18, 2024 18:06
lualib/resty/events/broker.lua Outdated Show resolved Hide resolved
lualib/resty/events/broker.lua Outdated Show resolved Hide resolved
lualib/resty/events/broker.lua Outdated Show resolved Hide resolved
lualib/resty/events/broker.lua Outdated Show resolved Hide resolved
@bungle bungle force-pushed the feat/worker-id-based-queues-only branch 3 times, most recently from dfefb27 to c040876 Compare June 18, 2024 21:08
tzssangglass
tzssangglass previously approved these changes Jun 19, 2024
@bungle bungle force-pushed the feat/worker-id-based-queues-only branch from c040876 to c26675d Compare June 19, 2024 05:27
@bungle bungle force-pushed the feat/worker-id-based-queues-only branch 4 times, most recently from ab857cd to 6489e60 Compare June 19, 2024 10:22
### Summary

Switches from worker connection based broker queues to worker id based broker queues
that makes it possible to retain events even when worker has not yet connected
(on node startup), or worker is restarting/reloading.
@bungle bungle force-pushed the feat/worker-id-based-queues-only branch from 6489e60 to 2e9f34d Compare June 19, 2024 10:23
Copy link
Member

@gszr gszr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one final comment

lualib/resty/events/broker.lua Show resolved Hide resolved
@gszr gszr requested a review from tzssangglass June 19, 2024 10:46
@bungle bungle merged commit c34192e into main Jun 19, 2024
12 checks passed
@bungle bungle deleted the feat/worker-id-based-queues-only branch June 19, 2024 11:15
bungle added a commit that referenced this pull request Jun 19, 2024
### Summary

- [style(lib/compat): update module version](#57)
- [tests(*): use resty.events.new correctly as documented](#59)
- [feat(protocol): send worker info (id and pid) to broker](#54)
- [fix(*): option validation of broker id](#62)
- [fix(broker): worker id based queues](#60)
- [chore(worker): actively close connection to broker on error](#63)
- [fix(*): retain events on send failures](#61)
@bungle bungle mentioned this pull request Jun 19, 2024
bungle added a commit to Kong/kong that referenced this pull request Jun 19, 2024
### Summary

- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit that referenced this pull request Jun 19, 2024
### Summary

- [style(lib/compat): update module version](#57)
- [tests(*): use resty.events.new correctly as documented](#59)
- [feat(protocol): send worker info (id and pid) to broker](#54)
- [fix(*): option validation of broker id](#62)
- [fix(broker): worker id based queues](#60)
- [chore(worker): actively close connection to broker on error](#63)
- [fix(*): retain events on send failures](#61)
bungle added a commit to Kong/kong that referenced this pull request Jun 19, 2024
### Summary

- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit to Kong/kong that referenced this pull request Jun 19, 2024
### Summary

- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit to Kong/kong that referenced this pull request Jun 19, 2024
### Summary

- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit to Kong/kong that referenced this pull request Jun 20, 2024
- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit to Kong/kong that referenced this pull request Jun 20, 2024
- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit to Kong/kong that referenced this pull request Jun 20, 2024
- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit to Kong/kong that referenced this pull request Jun 20, 2024
- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit to Kong/kong that referenced this pull request Jun 21, 2024
- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit to Kong/kong that referenced this pull request Jun 21, 2024
- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit to Kong/kong that referenced this pull request Jun 28, 2024
- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
bungle added a commit to Kong/kong that referenced this pull request Jun 28, 2024
- [style(lib/compat): update module version](Kong/lua-resty-events#57)
- [tests(*): use resty.events.new correctly as documented](Kong/lua-resty-events#59)
- [feat(protocol): send worker info (id and pid) to broker](Kong/lua-resty-events#54)
- [fix(*): option validation of broker id](Kong/lua-resty-events#62)
- [fix(broker): worker id based queues](Kong/lua-resty-events#60)
- [chore(worker): actively close connection to broker on error](Kong/lua-resty-events#63)
- [fix(*): retain events on send failures](Kong/lua-resty-events#61)

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

4 participants