RockteMQ-AI commented on code in PR #1368:
URL: https://github.com/apache/rocketmq-clients/pull/1368#discussion_r4004734408


##########
nodejs/src/client/BaseClient.ts:
##########
@@ -28,26 +28,42 @@ import {
   QueryRouteRequest,
   RecoverOrphanedTransactionCommand,
   VerifyMessageCommand,
+  VerifyMessageResult,
   PrintThreadStackTraceCommand,
   ReconnectEndpointsCommand,
   TelemetryCommand,
   ThreadStackTrace,
   HeartbeatRequest,
   NotifyClientTerminationRequest,
+  NotifyUnsubscribeLiteCommand,
 } from '../../proto/apache/rocketmq/v2/service_pb';
 import { createResource, getRequestDateTime, sign } from '../util';
 import { TopicRouteData, Endpoints } from '../route';
-import { ClientException, StatusChecker } from '../exception';
+import { ClientException, NotFoundException, StatusChecker } from 
'../exception';
+import {
+  CompositedMessageInterceptor,
+  GeneralMessage,
+  MessageInterceptor,
+  MessageInterceptorContext,
+  MessageMeterInterceptor,
+} from '../hook';
 import { Settings } from './Settings';
 import { UserAgent } from './UserAgent';
 import { ILogger, getDefaultLogger } from './Logger';
 import { SessionCredentials } from './SessionCredentials';
 import { RpcClientManager } from './RpcClientManager';
 import { TelemetrySession } from './TelemetrySession';
 import { ClientId } from './ClientId';
+import { ClientMeterManager } from '../metrics';
+import { Metric } from '../metrics/Metric';
 
 const debug = debuglog('rocketmq-client-nodejs:client:BaseClient');
 
+// Trigger transport self-healing (D-2) after this many consecutive heartbeat 
failures
+const HEARTBEAT_TRANSPORT_RECOVERY_THRESHOLD = 2;
+// Minimum interval between transport-recovery attempts per endpoints
+const TRANSPORT_RECOVERY_COOLDOWN = 30 * 1000;
+
 export interface BaseClientOptions {
   sslEnabled?: boolean;
   /**

Review Comment:
   Consider making `TRANSPORT_RECOVERY_COOLDOWN` configurable via 
`BaseClientOptions` to allow users to tune the recovery behavior for different 
network conditions.



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