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

   ## P5 feat(nodejs): message interceptor hooks and 
NOTIFY_UNSUBSCRIBE_LITE_COMMAND
   
   New `src/hook/` package with all 8 hook points (`SEND`, `RECEIVE`, 
`CONSUME`, `ACK`,
   `CHANGE_INVISIBLE_DURATION`, `COMMIT_TRANSACTION`, `ROLLBACK_TRANSACTION`,
   `FORWARD_TO_DLQ`):
   
   - `MessageInterceptor` + `CompositedMessageInterceptor` (doBefore in order, 
doAfter in
     reverse, failures isolated), `Attribute` / `AttributeKey`,
     `MessageInterceptorContext(Impl)`, built-in 
`InflightRequestCountInterceptor`.
   - Wiring: SEND in `Producer#send`; RECEIVE / ACK / CHANGE_INVISIBLE_DURATION 
in
     `Consumer`; CONSUME in `ConsumeTask`; transaction hooks around 
`EndTransaction`;
     FORWARD_TO_DLQ around every DLQ RPC attempt.
   - `BaseClientOptions#messageInterceptor` accepts one interceptor or an array;
     registration is only allowed before the client runs.
   - `TelemetrySession` now dispatches `NOTIFY_UNSUBSCRIBE_LITE_COMMAND` (oneof 
field 9) to
     `BaseClient#onNotifyUnsubscribeLiteCommand`; `LitePushConsumerImpl` 
forwards it to
     `LiteSubscriptionManager`.
   
   **Tests:** `nodejs/test/hook.test.ts` (9 cases, offline, all pass)


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