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

[latte] Fix BrokerClient topic handling #11

Merged
merged 1 commit into from Feb 21, 2024

Conversation

wasdennnoch
Copy link
Member

@wasdennnoch wasdennnoch commented Feb 18, 2024

There was a bug in the previous implementation where the BrokerClient would deregister a topic as soon as a specific key didn't have any listeners, ignoring the fact that other keys might be listening on the same topic. In tea this caused errors, because our clients then tried to access topics that were errorneously removed. This PR fixes the logic to only deregister a topic when there actually are no listeners for any keys. It also moves this handling of keys and topics into the TopicMetadata class so that the BrokerClient doesn't have to deal with it anymore.

Additionally, a bug/error caused by recursive BrokerClient destruction has been fixed, and some additional logging added. The Log4j config has been adjusted to actually allow those logs to be processed; previously, Log4j would use its own shutdown hook and stop logging anything once shutdown is initiated, meaning we didn't see the aforementioned errors and logs during destruction.

@wasdennnoch wasdennnoch added the bug Something isn't working label Feb 18, 2024
@wasdennnoch wasdennnoch merged commit 852c121 into main Feb 21, 2024
1 check passed
@wasdennnoch wasdennnoch deleted the adrian/fix-brokerclient-topic-handling branch February 21, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants