zhaohai666 opened a new pull request, #1482:
URL: https://github.com/apache/rocketmq-clients/pull/1482
## Purpose
Stop hammering an overloaded proxy and stop flooding the log during an
outage.
## Changes
- `golang/process_queue.go`: remove `RECEIVING_FLOW_CONTROL_BACKOFF_DELAY`
(20 ms) and the `TOO_MANY_REQUESTS` special case in
`onReceiveMessageException`; every failed reception now retries after the
full 1 s `RECEIVING_FAILURE_BACKOFF_DELAY`.
- Add `consecutiveReceptionFailures` and `RECEPTION_FAILURE_LOG_PERIOD = 30`:
first failure ERROR, every 30th consecutive failure WARN with the
cumulative
count, everything in between DEBUG. Success and `MESSAGE_NOT_FOUND` reset
the
counter (an empty long poll is a completed reception, not a failure).
- Reschedule messages are logged at DEBUG instead of INFO.
## Test plan
`go build ./...`, `go vet .`, `go test -count=1 .`. Real-cluster behaviour
was
observed in #1473: broker `kill -9` for 75 s produced exactly one reception
ERROR plus WARN at `consecutiveFailures=30` and `=60`, with consumption
resuming
automatically after recovery.
---
This PR is part of the split of #1473 into smaller, single-feature PRs for
easier
review. #1473 was merged as one large change; this branch reconstructs
exactly one
of its features as an atomic commit, based on `master`.
Verified locally in `golang/`: `go build ./...`, `go vet .`, `go test
-count=1 .`.
> Note: #1473 is already merged upstream, so this PR is the atomic
> reconstruction of one feature for independent review only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]