f1amingo opened a new pull request, #1503:
URL: https://github.com/apache/rocketmq-clients/pull/1503

   ### Summary
   
   The Node.js producer filtered publishing queues by queue id instead of 
broker id, so each broker only used queue 0, and it never refreshed those 
queues on route updates. A gzip body that failed to decode rejected the whole 
received batch, recall failures surfaced as plain `Error`s, and failed 
transactional messages were not retried. This aligns these paths with the Java 
client.
   
   ### Changes
   
   - Select writable queues of master brokers by broker id and rebuild the 
publishing load balancer on topic route updates.
   - Mark a message corrupted and keep its raw body when gzip decoding fails.
   - Map recall failures to typed exceptions through `StatusChecker`, including 
`MESSAGE_NOT_FOUND`.
   - Retry failed transactional messages up to `maxAttempts`, and throw 
`InternalErrorException` when the send receipt count mismatches.
   - Ignore orphaned transaction commands without a message instead of leaving 
an unhandled rejection.
   - Pass the producer logger into `Transaction` through an optional 
constructor argument and export `Transaction`.
   - Add offline unit tests for the producer, transactions, publishing 
settings, publishing messages and message decoding.
   
   ### Compatibility
   
   No public signature is removed or changed. `Transaction` is newly exported, 
and `MessageView.corrupted` is `false` instead of `undefined` for intact 
messages. Recall errors are typed and use the message format of other client 
exceptions. A failed transactional send may now take up to `maxAttempts` 
requests; set `maxAttempts: 1` to keep the previous behavior.
   
   ### How Did You Test This Change?
   
   337 unit tests pass on Node.js 18 and 24, up from 244; lint and 
production/test type checks pass. The new regression tests fail without the 
fixes.


-- 
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]

Reply via email to