-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(protocol): send worker info (id and pid) to broker #54
Conversation
Luacheck Report1 tests 0 ✅ 0s ⏱️ For more details on these failures, see this check. Results for commit e649ea0. ♻️ This comment has been updated with latest results. |
400ffaa
to
6126c0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can postpone this as a standalone job.
What does postponing as a standalone job mean? Do you mean we can cut a release without it? I completely agree. This PR just builds basis for future improvements that I will open ”soon”. |
6126c0d
to
afb1020
Compare
If it is not urgent, I tend to turn it to draft. |
afb1020
to
65b5845
Compare
0a9f2bb
to
184c5bb
Compare
1dd8b26
to
8a7141e
Compare
Question: what is the advantage of replacing connection with worker id? Could I get some explain? |
Workers can crash. So this code:
if it was something like:
We could make queues survive across worker crashes (and continue writing on them). We could also simplify a lot of loops to just:
I think that with this library we can and probably should assume that each worker connects to a broker. |
8a7141e
to
62bf45c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
62bf45c
to
f7df382
Compare
### Summary This is a feature that sends worker info to broker. This feature is needed for future PRs to implement worker id based broker queues (to replace worker connection based queues).
f7df382
to
e649ea0
Compare
### 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)
### 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)
### 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>
### 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>
- [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>
- [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>
- [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>
- [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>
- [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>
- [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>
Summary
This is a feature that sends worker info to broker. This feature is needed for future PRs to implement worker id based broker queues (to replace worker connection based queues).