Skip to content

Commit 7dc82e4

Browse files
committed
docs: update code explanation for gateway service RPC and Attributes Request
1 parent 696fe29 commit 7dc82e4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

examples/auth-keycloak/docs/03_CODE_EXPLANATION.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ Module `backend/src/mqtt/gatewayService.ts` đảm nhiệm:
108108

109109
- tự tạo downstream device khi nhận connect/telemetry/attributes;
110110
- tạo relation `Contains` giữa Gateway và downstream device;
111+
- xử lý Server-side RPC (two-way) bằng cách chuyển luồng REST API sang MQTT Topic `v1/gateway/rpc`, và hứng kết quả ở `v1/gateway/rpc/response` (sử dụng Event Emitter);
112+
- hỗ trợ thiết bị con xin phép lấy Shared Attributes thông qua `v1/gateway/attributes/request`;
111113
- đẩy cả telemetry và client attributes vào Redis Streams để worker batch/ACK;
112114
- cập nhật `active`, `lastConnectTime`, `lastDisconnectTime`, `lastActivityTime`;
113115
- áp dụng `overwriteActivityTime` cho các thiết bị đang kết nối.

0 commit comments

Comments
 (0)