Skip to content

[Golang] fix(client.go): fix bug where NotifyClientTermination was never called - #1221

Merged
RongtongJin merged 4 commits into
apache:masterfrom
f1amingo:fix_notify_client_termination
Apr 15, 2026
Merged

RongtongJin merged 4 commits into
apache:masterfrom
f1amingo:fix_notify_client_termination

Conversation

@f1amingo

Copy link
Copy Markdown
Contributor

Fixed logic error in notifyClientTermination method. The previous implementation incorrectly checked err != nil instead of endpoints != nil, which prevented NotifyClientTermination from being called. Added proper error handling with detailed logging for each notification attempt.

Fixed logic error in `notifyClientTermination` method. The previous implementation incorrectly checked `err != nil` instead of `endpoints != nil`, which prevented `NotifyClientTermination` from being called. Added proper error handling with detailed logging for each notification attempt.

Change-Id: I05c41d18419d107877150f623d97eedc29dcd546

@guyinyou guyinyou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

โ€ฆ request

Added resource group information to the client termination notification request, including namespace and consumer group name.

Change-Id: I26d28ad6f8e6ddf46f49ad5c01c7c0aac40135c3
RongtongJin
RongtongJin previously approved these changes Apr 15, 2026
โ€ฆogic

Optimized the logging strategy when errors occur during message reception, with special handling for cases where no new messages are found to avoid unnecessary error log output. Meanwhile, the detailed error logging mechanism for other exceptional cases is preserved.

Change-Id: I4b0ef5d2c41fea0727ff6950cbf415b4f935e20b

@guyinyou guyinyou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

Extracted `topic` and `group` variables from the `syncLiteSubscription` method and adjusted log output formats based on different action types, making the code more readable and logs more detailed.

Change-Id: Iba358e912af41266d84680435c682a5e19f55711
@f1amingo
f1amingo force-pushed the fix_notify_client_termination branch from 51ef6d0 to d753836 Compare April 15, 2026 09:41
@RongtongJin
RongtongJin merged commit e05d5a9 into apache:master Apr 15, 2026
14 of 15 checks passed
terrancesli added a commit to terrancesli/rocketmq-clients that referenced this pull request May 15, 2026
โ€ฆver called (apache#1221)

* fix(client.go): fix bug where NotifyClientTermination was never called

Fixed logic error in `notifyClientTermination` method. The previous implementation incorrectly checked `err != nil` instead of `endpoints != nil`, which prevented `NotifyClientTermination` from being called. Added proper error handling with detailed logging for each notification attempt.

Change-Id: I05c41d18419d107877150f623d97eedc29dcd546

* fix(client.go): add resource group to client termination notification request

Added resource group information to the client termination notification request, including namespace and consumer group name.

Change-Id: I26d28ad6f8e6ddf46f49ad5c01c7c0aac40135c3

* fix(process_queue.go): Improve message reception exception handling logic

Optimized the logging strategy when errors occur during message reception, with special handling for cases where no new messages are found to avoid unnecessary error log output. Meanwhile, the detailed error logging mechanism for other exceptional cases is preserved.

Change-Id: I4b0ef5d2c41fea0727ff6950cbf415b4f935e20b

* refactor(lite_push_consumer.go): extract variables and optimize logging

Extracted `topic` and `group` variables from the `syncLiteSubscription` method and adjusted log output formats based on different action types, making the code more readable and logs more detailed.

Change-Id: Iba358e912af41266d84680435c682a5e19f55711
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.

3 participants