rocketmq-client-remoting-nodejs 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/README.en.md +428 -0
  2. package/README.md +424 -2
  3. package/dist/client/admin.d.ts +229 -0
  4. package/dist/client/admin.js +2462 -0
  5. package/dist/client/allocate.d.ts +48 -0
  6. package/dist/client/allocate.js +365 -0
  7. package/dist/client/backpressure.d.ts +23 -0
  8. package/dist/client/backpressure.js +95 -0
  9. package/dist/client/consumer.d.ts +294 -0
  10. package/dist/client/consumer.js +3095 -0
  11. package/dist/client/consumer_result.d.ts +129 -0
  12. package/dist/client/consumer_result.js +138 -0
  13. package/dist/client/consumer_stats.d.ts +69 -0
  14. package/dist/client/consumer_stats.js +258 -0
  15. package/dist/client/exception.d.ts +39 -0
  16. package/dist/client/exception.js +36 -0
  17. package/dist/client/hook.d.ts +145 -0
  18. package/dist/client/hook.js +171 -0
  19. package/dist/client/latency.d.ts +61 -0
  20. package/dist/client/latency.js +239 -0
  21. package/dist/client/lite_pull_consumer.d.ts +151 -0
  22. package/dist/client/lite_pull_consumer.js +1096 -0
  23. package/dist/client/mq_client.d.ts +188 -0
  24. package/dist/client/mq_client.js +1678 -0
  25. package/dist/client/mq_client_manager.d.ts +21 -0
  26. package/dist/client/mq_client_manager.js +129 -0
  27. package/dist/client/offset_store.d.ts +45 -0
  28. package/dist/client/offset_store.js +389 -0
  29. package/dist/client/open_tracing_hook.d.ts +52 -0
  30. package/dist/client/open_tracing_hook.js +241 -0
  31. package/dist/client/pop_api.d.ts +28 -0
  32. package/dist/client/pop_api.js +224 -0
  33. package/dist/client/pop_consumer.d.ts +23 -0
  34. package/dist/client/pop_consumer.js +719 -0
  35. package/dist/client/pop_process_queue.d.ts +15 -0
  36. package/dist/client/pop_process_queue.js +51 -0
  37. package/dist/client/process_queue.d.ts +49 -0
  38. package/dist/client/process_queue.js +261 -0
  39. package/dist/client/produce_accumulator.d.ts +75 -0
  40. package/dist/client/produce_accumulator.js +288 -0
  41. package/dist/client/producer.d.ts +231 -0
  42. package/dist/client/producer.js +1774 -0
  43. package/dist/client/pull_api.d.ts +26 -0
  44. package/dist/client/pull_api.js +264 -0
  45. package/dist/client/pull_consumer.d.ts +119 -0
  46. package/dist/client/pull_consumer.js +876 -0
  47. package/dist/client/pull_schedule_service.d.ts +71 -0
  48. package/dist/client/pull_schedule_service.js +424 -0
  49. package/dist/client/request_reply.d.ts +61 -0
  50. package/dist/client/request_reply.js +232 -0
  51. package/dist/client/retry_message.d.ts +2 -0
  52. package/dist/client/retry_message.js +27 -0
  53. package/dist/client/send_result.d.ts +57 -0
  54. package/dist/client/send_result.js +70 -0
  55. package/dist/client/top_addressing.d.ts +20 -0
  56. package/dist/client/top_addressing.js +75 -0
  57. package/dist/client/trace_context.d.ts +61 -0
  58. package/dist/client/trace_context.js +373 -0
  59. package/dist/client/trace_dispatcher.d.ts +31 -0
  60. package/dist/client/trace_dispatcher.js +236 -0
  61. package/dist/client/trace_hook.d.ts +23 -0
  62. package/dist/client/trace_hook.js +228 -0
  63. package/dist/client/traceparent.d.ts +9 -0
  64. package/dist/client/traceparent.js +86 -0
  65. package/dist/common/boundary_type.d.ts +7 -0
  66. package/dist/common/boundary_type.js +16 -0
  67. package/dist/common/compress.d.ts +28 -0
  68. package/dist/common/compress.js +512 -0
  69. package/dist/common/message.d.ts +129 -0
  70. package/dist/common/message.js +214 -0
  71. package/dist/common/messageClientIdSetter.d.ts +7 -0
  72. package/dist/common/messageClientIdSetter.js +48 -0
  73. package/dist/common/messageConst.d.ts +68 -0
  74. package/dist/common/messageConst.js +68 -0
  75. package/dist/common/messageDecoder.d.ts +40 -0
  76. package/dist/common/messageDecoder.js +504 -0
  77. package/dist/common/messageType.d.ts +11 -0
  78. package/dist/common/messageType.js +11 -0
  79. package/dist/common/message_accessor.d.ts +39 -0
  80. package/dist/common/message_accessor.js +135 -0
  81. package/dist/common/mixAll.d.ts +106 -0
  82. package/dist/common/mixAll.js +247 -0
  83. package/dist/common/recall_message_handle.d.ts +25 -0
  84. package/dist/common/recall_message_handle.js +98 -0
  85. package/dist/common/subscriptionData.d.ts +36 -0
  86. package/dist/common/subscriptionData.js +64 -0
  87. package/dist/common/sysflag.d.ts +129 -0
  88. package/dist/common/sysflag.js +96 -0
  89. package/dist/common/topic_config.d.ts +66 -0
  90. package/dist/common/topic_config.js +106 -0
  91. package/dist/common/topic_validator.d.ts +49 -0
  92. package/dist/common/topic_validator.js +115 -0
  93. package/dist/common/utilAll.d.ts +39 -0
  94. package/dist/common/utilAll.js +154 -0
  95. package/dist/common/validators.d.ts +25 -0
  96. package/dist/common/validators.js +80 -0
  97. package/dist/index.d.ts +24 -0
  98. package/dist/index.js +36 -0
  99. package/dist/logging.d.ts +24 -0
  100. package/dist/logging.js +246 -0
  101. package/dist/remoting/acl.d.ts +16 -0
  102. package/dist/remoting/acl.js +39 -0
  103. package/dist/remoting/admin_body.d.ts +257 -0
  104. package/dist/remoting/admin_body.js +669 -0
  105. package/dist/remoting/bodies.d.ts +475 -0
  106. package/dist/remoting/bodies.js +1131 -0
  107. package/dist/remoting/client.d.ts +73 -0
  108. package/dist/remoting/client.js +591 -0
  109. package/dist/remoting/codes.d.ts +296 -0
  110. package/dist/remoting/codes.js +301 -0
  111. package/dist/remoting/exception.d.ts +45 -0
  112. package/dist/remoting/exception.js +58 -0
  113. package/dist/remoting/extra_info.d.ts +61 -0
  114. package/dist/remoting/extra_info.js +220 -0
  115. package/dist/remoting/headers.d.ts +758 -0
  116. package/dist/remoting/headers.js +1307 -0
  117. package/dist/remoting/heartbeat.d.ts +91 -0
  118. package/dist/remoting/heartbeat.js +227 -0
  119. package/dist/remoting/namespace.d.ts +14 -0
  120. package/dist/remoting/namespace.js +85 -0
  121. package/dist/remoting/pop_bodies.d.ts +58 -0
  122. package/dist/remoting/pop_bodies.js +214 -0
  123. package/dist/remoting/remotingCommand.d.ts +39 -0
  124. package/dist/remoting/remotingCommand.js +225 -0
  125. package/dist/remoting/route.d.ts +61 -0
  126. package/dist/remoting/route.js +288 -0
  127. package/dist/remoting/rpc_hooks.d.ts +31 -0
  128. package/dist/remoting/rpc_hooks.js +73 -0
  129. package/dist/remoting/serialize.d.ts +33 -0
  130. package/dist/remoting/serialize.js +372 -0
  131. package/dist/remoting/socks_proxy.d.ts +29 -0
  132. package/dist/remoting/socks_proxy.js +379 -0
  133. package/dist/remoting/static_topic.d.ts +49 -0
  134. package/dist/remoting/static_topic.js +244 -0
  135. package/dist/remoting/subscription.d.ts +65 -0
  136. package/dist/remoting/subscription.js +172 -0
  137. package/package.json +38 -4
@@ -0,0 +1,257 @@
1
+ import { MessageQueue } from '../common/message.js';
2
+ import { messageQueueKey, parseMessageQueueKey, decodeMessageQueueMap, TopicConfig, TopicConfigSerializeWrapper, OffsetWrapper, ConsumeStats, ConsumerRunningInfo } from './bodies.js';
3
+ export { messageQueueKey, parseMessageQueueKey, decodeMessageQueueMap, TopicConfig, TopicConfigSerializeWrapper, OffsetWrapper, ConsumeStats, ConsumerRunningInfo, };
4
+ export declare class TopicOffset {
5
+ minOffset: number;
6
+ maxOffset: number;
7
+ lastUpdateTimestamp: number;
8
+ constructor(minOffset?: number, maxOffset?: number, lastUpdateTimestamp?: number);
9
+ toDict(): Record<string, any>;
10
+ static fromDict(d: Record<string, any>): TopicOffset;
11
+ encode(): Buffer;
12
+ static decode(data: Buffer): TopicOffset;
13
+ toString(): string;
14
+ }
15
+ export declare class TopicStatsTable {
16
+ offsetTable: Map<MessageQueue, TopicOffset>;
17
+ topicPutTps: number;
18
+ toDict(): Record<string, any>;
19
+ static fromDict(d: Record<string, any>): TopicStatsTable;
20
+ encode(): Buffer;
21
+ static decode(data: Buffer): TopicStatsTable;
22
+ }
23
+ export declare class ConsumeQueueData {
24
+ physicOffset: number;
25
+ physicSize: number;
26
+ tagsCode: number;
27
+ extendDataJson: string | null;
28
+ bitMap: string | null;
29
+ eval: boolean;
30
+ msg: string | null;
31
+ constructor(physicOffset?: number, physicSize?: number, tagsCode?: number, extendDataJson?: string | null, bitMap?: string | null, eval_?: boolean, msg?: string | null);
32
+ toDict(): Record<string, any>;
33
+ static fromDict(d: Record<string, any>): ConsumeQueueData;
34
+ }
35
+ export declare class QueryConsumeQueueResponseBody {
36
+ subscriptionData: Record<string, any> | null;
37
+ filterData: string | null;
38
+ queueData: ConsumeQueueData[] | null;
39
+ maxQueueIndex: number;
40
+ minQueueIndex: number;
41
+ toDict(): Record<string, any>;
42
+ static fromDict(d: Record<string, any>): QueryConsumeQueueResponseBody;
43
+ encode(): Buffer;
44
+ static decode(data: Buffer): QueryConsumeQueueResponseBody;
45
+ }
46
+ export declare class GroupForbidden {
47
+ topic: string | null;
48
+ group: string | null;
49
+ readable: boolean | null;
50
+ toDict(): Record<string, any>;
51
+ static fromDict(d: Record<string, any>): GroupForbidden;
52
+ encode(): Buffer;
53
+ static decode(data: Buffer): GroupForbidden;
54
+ }
55
+ export declare const UserType: {
56
+ SUPER: string;
57
+ NORMAL: string;
58
+ };
59
+ export declare const UserStatus: {
60
+ ENABLE: string;
61
+ DISABLE: string;
62
+ };
63
+ export declare const PolicyType: {
64
+ CUSTOM: string;
65
+ DEFAULT: string;
66
+ };
67
+ export declare const Decision: {
68
+ ALLOW: string;
69
+ DENY: string;
70
+ };
71
+ export declare class UserInfo {
72
+ username: string | null;
73
+ password: string | null;
74
+ userType: string | null;
75
+ userStatus: string | null;
76
+ constructor(username?: string | null, password?: string | null, userType?: string | null, userStatus?: string | null);
77
+ toDict(): Record<string, any>;
78
+ static fromDict(d: Record<string, any>): UserInfo;
79
+ encode(): Buffer;
80
+ static decode(data: Buffer): UserInfo;
81
+ static decodeList(data: Buffer): UserInfo[];
82
+ toString(): string;
83
+ }
84
+ export declare class AclEntry {
85
+ resource: string | null;
86
+ actions: string[] | null;
87
+ sourceIps: string[] | null;
88
+ decision: string | null;
89
+ constructor(resource?: string | null, actions?: string[] | null, sourceIps?: string[] | null, decision?: string | null);
90
+ toDict(): Record<string, any>;
91
+ static fromDict(d: Record<string, any>): AclEntry;
92
+ }
93
+ export declare class AclPolicy {
94
+ policyType: string | null;
95
+ entries: AclEntry[];
96
+ constructor(policyType?: string | null, entries?: AclEntry[]);
97
+ toDict(): Record<string, any>;
98
+ static fromDict(d: Record<string, any>): AclPolicy;
99
+ }
100
+ export declare class AclInfo {
101
+ subject: string | null;
102
+ policies: AclPolicy[];
103
+ constructor(subject?: string | null, policies?: AclPolicy[]);
104
+ static fromResources(subject: string, resources: string[] | null, actions: string[] | null, sourceIps: string[] | null, decision: string | null): AclInfo;
105
+ toDict(): Record<string, any>;
106
+ static fromDict(d: Record<string, any>): AclInfo;
107
+ encode(): Buffer;
108
+ static decode(data: Buffer): AclInfo;
109
+ static decodeList(data: Buffer): AclInfo[];
110
+ toString(): string;
111
+ }
112
+ export declare class ReplicaIdentity {
113
+ brokerName: string | null;
114
+ brokerId: number | null;
115
+ brokerAddress: string | null;
116
+ alive: boolean | null;
117
+ toDict(): Record<string, any>;
118
+ static fromDict(d: Record<string, any>): ReplicaIdentity;
119
+ toString(): string;
120
+ }
121
+ export declare class ReplicasInfo {
122
+ masterBrokerId: number | null;
123
+ masterAddress: string | null;
124
+ masterEpoch: number | null;
125
+ syncStateSetEpoch: number | null;
126
+ inSyncReplicas: ReplicaIdentity[] | null;
127
+ notInSyncReplicas: ReplicaIdentity[] | null;
128
+ toDict(): Record<string, any>;
129
+ static fromDict(d: Record<string, any>): ReplicasInfo;
130
+ }
131
+ export declare class BrokerReplicasInfo {
132
+ replicasInfoTable: Record<string, ReplicasInfo>;
133
+ toDict(): Record<string, any>;
134
+ static fromDict(d: Record<string, any>): BrokerReplicasInfo;
135
+ encode(): Buffer;
136
+ static decode(data: Buffer): BrokerReplicasInfo;
137
+ }
138
+ export declare class GetMetaDataResponseHeader {
139
+ group: string | null;
140
+ controllerLeaderId: string | null;
141
+ controllerLeaderAddress: string | null;
142
+ isLeader: boolean;
143
+ peers: string | null;
144
+ static fromDict(d: Record<string, any>): GetMetaDataResponseHeader;
145
+ toString(): string;
146
+ }
147
+ export declare const CheckRocksdbCqWriteStatus: {
148
+ readonly CHECK_OK: 0;
149
+ readonly CHECK_NOT_OK: 1;
150
+ readonly CHECK_IN_PROGRESS: 2;
151
+ readonly CHECK_ERROR: 3;
152
+ };
153
+ export declare class CheckRocksdbCqWriteResult {
154
+ checkResult: string | null;
155
+ checkStatus: number;
156
+ toDict(): Record<string, any>;
157
+ static fromDict(d: Record<string, any>): CheckRocksdbCqWriteResult;
158
+ encode(): Buffer;
159
+ static decode(data: Buffer): CheckRocksdbCqWriteResult;
160
+ toString(): string;
161
+ }
162
+ export declare class GetBrokerLiteInfoResponseBody {
163
+ storeType: string | null;
164
+ maxLmqNum: number;
165
+ currentLmqNum: number;
166
+ liteSubscriptionCount: number;
167
+ orderInfoCount: number;
168
+ cqTableSize: number;
169
+ offsetTableSize: number;
170
+ eventMapSize: number;
171
+ topicMeta: Record<string, number> | null;
172
+ groupMeta: Record<string, string[]> | null;
173
+ static fromDict(d: Record<string, any>): GetBrokerLiteInfoResponseBody;
174
+ encode(): Buffer;
175
+ static decode(data: Buffer): GetBrokerLiteInfoResponseBody;
176
+ }
177
+ export declare class GetParentTopicInfoResponseBody {
178
+ topic: string | null;
179
+ ttl: number;
180
+ groups: string[] | null;
181
+ lmqNum: number;
182
+ liteTopicCount: number;
183
+ static fromDict(d: Record<string, any>): GetParentTopicInfoResponseBody;
184
+ encode(): Buffer;
185
+ static decode(data: Buffer): GetParentTopicInfoResponseBody;
186
+ }
187
+ export declare class GetLiteTopicInfoResponseBody {
188
+ parentTopic: string | null;
189
+ liteTopic: string | null;
190
+ subscriber: Record<string, any>[] | null;
191
+ topicOffset: Record<string, any> | null;
192
+ shardingToBroker: boolean;
193
+ static fromDict(d: Record<string, any>): GetLiteTopicInfoResponseBody;
194
+ encode(): Buffer;
195
+ static decode(data: Buffer): GetLiteTopicInfoResponseBody;
196
+ }
197
+ export declare class GetLiteClientInfoResponseBody {
198
+ parentTopic: string | null;
199
+ group: string | null;
200
+ clientId: string | null;
201
+ lastAccessTime: number;
202
+ lastConsumeTime: number;
203
+ liteTopicCount: number;
204
+ liteTopicSet: string[] | null;
205
+ static fromDict(d: Record<string, any>): GetLiteClientInfoResponseBody;
206
+ encode(): Buffer;
207
+ static decode(data: Buffer): GetLiteClientInfoResponseBody;
208
+ }
209
+ export declare class LiteLagInfo {
210
+ liteTopic: string | null;
211
+ lagCount: number;
212
+ earliestUnconsumedTimestamp: number;
213
+ consumerOffset: number;
214
+ static fromDict(d: Record<string, any>): LiteLagInfo;
215
+ }
216
+ export declare class GetLiteGroupInfoResponseBody {
217
+ group: string | null;
218
+ parentTopic: string | null;
219
+ liteTopic: string | null;
220
+ earliestUnconsumedTimestamp: number;
221
+ totalLagCount: number;
222
+ liteTopicOffsetWrapper: Record<string, any> | null;
223
+ lagCountTopK: LiteLagInfo[] | null;
224
+ lagTimestampTopK: LiteLagInfo[] | null;
225
+ static fromDict(d: Record<string, any>): GetLiteGroupInfoResponseBody;
226
+ encode(): Buffer;
227
+ static decode(data: Buffer): GetLiteGroupInfoResponseBody;
228
+ }
229
+ export declare class BrokerOperatorResult {
230
+ successList: string[];
231
+ failureList: string[];
232
+ toDict(): Record<string, any>;
233
+ static fromDict(d: Record<string, any>): BrokerOperatorResult;
234
+ toString(): string;
235
+ }
236
+ export declare const AdminToolsResultCodeEnum: {
237
+ readonly SUCCESS: 200;
238
+ readonly REMOTING_ERROR: -1001;
239
+ readonly MQ_BROKER_ERROR: -1002;
240
+ readonly MQ_CLIENT_ERROR: -1003;
241
+ readonly INTERRUPT_ERROR: -1004;
242
+ readonly TOPIC_ROUTE_INFO_NOT_EXIST: -2001;
243
+ readonly CONSUMER_NOT_ONLINE: -2002;
244
+ readonly BROADCAST_CONSUMPTION: -2003;
245
+ };
246
+ export declare class AdminToolResult<T = any> {
247
+ success: boolean;
248
+ code: number;
249
+ errorMsg: string | null;
250
+ data: T | null;
251
+ constructor(success: boolean, code: number, errorMsg?: string | null, data?: T | null);
252
+ static success<T>(data: T): AdminToolResult<T>;
253
+ static failure(code: number, errorMsg: string | null, data?: any): AdminToolResult<any>;
254
+ toDict(): Record<string, any>;
255
+ toString(): string;
256
+ }
257
+ export declare const __all__: string[];