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

   ### Summary
   
   Align Node.js client behavior with the Java SDK and fix gaps in namespace 
propagation, status handling, hooks, metrics, logging, and shutdown. This PR 
also consolidates internal RPC and settlement helpers and adds offline 
regression coverage while preserving existing public signatures and exports.
   
   ### Changes
   
   - Propagate the client namespace through route queries, consumer 
requests/settings, and Lite virtual queues.
   - Map Lite subscription and recall failures through `StatusChecker` and 
associate request IDs with RPC responses.
   - Retry missing DLQ statuses, log non-OK settlement responses, and stop 
settlement RPCs after abort.
   - Drain and abort process queues removed by rebalance or expiry, including 
in-flight receives, without forwarding cancelled FIFO retries to DLQ.
   - Run SEND hooks per attempt with Java-compatible attributes; align CONSUME 
attribute names and share one message instance across transactional send and 
commit/rollback.
   - Initialize message decode timestamps so consumption wait and processing 
latency metrics are recorded.
   - Use the configured client logger for interceptors and all four consumption 
services.
   - Rotate assignment queries across eligible master endpoints and send 
heartbeats concurrently.
   - Consolidate unary RPC wrappers, metadata/request-ID delegation, and 
settlement retry loops; remove commented-out code.
   
   ### Compatibility
   
   - Preserve existing public signatures, exports, constructor argument order, 
and valid calls; add optional logger parameters, an optional `createResource` 
namespace parameter, SEND attribute keys, and queue/route helper methods.
   - SEND hooks and send metrics run once per attempt. Attribute names are 
`messageType`, `sendReceipts`, and `sendException`; CONSUME names are 
`remoteAddr`, `messageView`, `consumerGroup`, and `consumeError`. Importing key 
constants remains supported; callers using literal attribute names should use 
these names.
   - Configured namespaces are now carried in the affected resources. Omitting 
the namespace preserves the empty-namespace request representation.
   - Lite subscription failures become mapped `ClientException` subclasses with 
request IDs; existing `ClientException` catches remain valid. A missing 
subscription or recall status raises `InternalErrorException`.
   - Shutdown drains removed queues within the existing timeout and prevents 
new consumption/settlement after abort. Missing DLQ statuses are retried, and 
settlement failures emit diagnostic logs.
   - Transaction hooks observe the same message ID as SEND. Consumption latency 
metrics become available; injected loggers remain caller-owned and are not 
closed by the SDK.
   
   ### How Did You Test This Change?
   
   - Node.js 18.20.8 and 24.18.0: 841 offline unit tests passed.
   - Node.js 24 coverage: 96.74% lines and 94.92% functions.
   - ESLint: zero errors; existing 54 JSDoc warnings remain.
   - Production and test TypeScript checks with `--noEmit`, and `git diff 
--check`, passed.
   - Negative controls verified the regression cases fail against the pre-fix 
sources and pass with the fixes.
   - A focused 167-test run without Mocha `--exit` passed and exited naturally; 
additional in-memory checks covered late callbacks in all four consumption 
services.
   - Online broker/proxy integration tests and GitHub CI have not been run for 
this change.
   


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