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.
- package/README.en.md +428 -0
- package/README.md +424 -2
- package/dist/client/admin.d.ts +229 -0
- package/dist/client/admin.js +2462 -0
- package/dist/client/allocate.d.ts +48 -0
- package/dist/client/allocate.js +365 -0
- package/dist/client/backpressure.d.ts +23 -0
- package/dist/client/backpressure.js +95 -0
- package/dist/client/consumer.d.ts +294 -0
- package/dist/client/consumer.js +3095 -0
- package/dist/client/consumer_result.d.ts +129 -0
- package/dist/client/consumer_result.js +138 -0
- package/dist/client/consumer_stats.d.ts +69 -0
- package/dist/client/consumer_stats.js +258 -0
- package/dist/client/exception.d.ts +39 -0
- package/dist/client/exception.js +36 -0
- package/dist/client/hook.d.ts +145 -0
- package/dist/client/hook.js +171 -0
- package/dist/client/latency.d.ts +61 -0
- package/dist/client/latency.js +239 -0
- package/dist/client/lite_pull_consumer.d.ts +151 -0
- package/dist/client/lite_pull_consumer.js +1096 -0
- package/dist/client/mq_client.d.ts +188 -0
- package/dist/client/mq_client.js +1678 -0
- package/dist/client/mq_client_manager.d.ts +21 -0
- package/dist/client/mq_client_manager.js +129 -0
- package/dist/client/offset_store.d.ts +45 -0
- package/dist/client/offset_store.js +389 -0
- package/dist/client/open_tracing_hook.d.ts +52 -0
- package/dist/client/open_tracing_hook.js +241 -0
- package/dist/client/pop_api.d.ts +28 -0
- package/dist/client/pop_api.js +224 -0
- package/dist/client/pop_consumer.d.ts +23 -0
- package/dist/client/pop_consumer.js +719 -0
- package/dist/client/pop_process_queue.d.ts +15 -0
- package/dist/client/pop_process_queue.js +51 -0
- package/dist/client/process_queue.d.ts +49 -0
- package/dist/client/process_queue.js +261 -0
- package/dist/client/produce_accumulator.d.ts +75 -0
- package/dist/client/produce_accumulator.js +288 -0
- package/dist/client/producer.d.ts +231 -0
- package/dist/client/producer.js +1774 -0
- package/dist/client/pull_api.d.ts +26 -0
- package/dist/client/pull_api.js +264 -0
- package/dist/client/pull_consumer.d.ts +119 -0
- package/dist/client/pull_consumer.js +876 -0
- package/dist/client/pull_schedule_service.d.ts +71 -0
- package/dist/client/pull_schedule_service.js +424 -0
- package/dist/client/request_reply.d.ts +61 -0
- package/dist/client/request_reply.js +232 -0
- package/dist/client/retry_message.d.ts +2 -0
- package/dist/client/retry_message.js +27 -0
- package/dist/client/send_result.d.ts +57 -0
- package/dist/client/send_result.js +70 -0
- package/dist/client/top_addressing.d.ts +20 -0
- package/dist/client/top_addressing.js +75 -0
- package/dist/client/trace_context.d.ts +61 -0
- package/dist/client/trace_context.js +373 -0
- package/dist/client/trace_dispatcher.d.ts +31 -0
- package/dist/client/trace_dispatcher.js +236 -0
- package/dist/client/trace_hook.d.ts +23 -0
- package/dist/client/trace_hook.js +228 -0
- package/dist/client/traceparent.d.ts +9 -0
- package/dist/client/traceparent.js +86 -0
- package/dist/common/boundary_type.d.ts +7 -0
- package/dist/common/boundary_type.js +16 -0
- package/dist/common/compress.d.ts +28 -0
- package/dist/common/compress.js +512 -0
- package/dist/common/message.d.ts +129 -0
- package/dist/common/message.js +214 -0
- package/dist/common/messageClientIdSetter.d.ts +7 -0
- package/dist/common/messageClientIdSetter.js +48 -0
- package/dist/common/messageConst.d.ts +68 -0
- package/dist/common/messageConst.js +68 -0
- package/dist/common/messageDecoder.d.ts +40 -0
- package/dist/common/messageDecoder.js +504 -0
- package/dist/common/messageType.d.ts +11 -0
- package/dist/common/messageType.js +11 -0
- package/dist/common/message_accessor.d.ts +39 -0
- package/dist/common/message_accessor.js +135 -0
- package/dist/common/mixAll.d.ts +106 -0
- package/dist/common/mixAll.js +247 -0
- package/dist/common/recall_message_handle.d.ts +25 -0
- package/dist/common/recall_message_handle.js +98 -0
- package/dist/common/subscriptionData.d.ts +36 -0
- package/dist/common/subscriptionData.js +64 -0
- package/dist/common/sysflag.d.ts +129 -0
- package/dist/common/sysflag.js +96 -0
- package/dist/common/topic_config.d.ts +66 -0
- package/dist/common/topic_config.js +106 -0
- package/dist/common/topic_validator.d.ts +49 -0
- package/dist/common/topic_validator.js +115 -0
- package/dist/common/utilAll.d.ts +39 -0
- package/dist/common/utilAll.js +154 -0
- package/dist/common/validators.d.ts +25 -0
- package/dist/common/validators.js +80 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +36 -0
- package/dist/logging.d.ts +24 -0
- package/dist/logging.js +246 -0
- package/dist/remoting/acl.d.ts +16 -0
- package/dist/remoting/acl.js +39 -0
- package/dist/remoting/admin_body.d.ts +257 -0
- package/dist/remoting/admin_body.js +669 -0
- package/dist/remoting/bodies.d.ts +475 -0
- package/dist/remoting/bodies.js +1131 -0
- package/dist/remoting/client.d.ts +73 -0
- package/dist/remoting/client.js +591 -0
- package/dist/remoting/codes.d.ts +296 -0
- package/dist/remoting/codes.js +301 -0
- package/dist/remoting/exception.d.ts +45 -0
- package/dist/remoting/exception.js +58 -0
- package/dist/remoting/extra_info.d.ts +61 -0
- package/dist/remoting/extra_info.js +220 -0
- package/dist/remoting/headers.d.ts +758 -0
- package/dist/remoting/headers.js +1307 -0
- package/dist/remoting/heartbeat.d.ts +91 -0
- package/dist/remoting/heartbeat.js +227 -0
- package/dist/remoting/namespace.d.ts +14 -0
- package/dist/remoting/namespace.js +85 -0
- package/dist/remoting/pop_bodies.d.ts +58 -0
- package/dist/remoting/pop_bodies.js +214 -0
- package/dist/remoting/remotingCommand.d.ts +39 -0
- package/dist/remoting/remotingCommand.js +225 -0
- package/dist/remoting/route.d.ts +61 -0
- package/dist/remoting/route.js +288 -0
- package/dist/remoting/rpc_hooks.d.ts +31 -0
- package/dist/remoting/rpc_hooks.js +73 -0
- package/dist/remoting/serialize.d.ts +33 -0
- package/dist/remoting/serialize.js +372 -0
- package/dist/remoting/socks_proxy.d.ts +29 -0
- package/dist/remoting/socks_proxy.js +379 -0
- package/dist/remoting/static_topic.d.ts +49 -0
- package/dist/remoting/static_topic.js +244 -0
- package/dist/remoting/subscription.d.ts +65 -0
- package/dist/remoting/subscription.js +172 -0
- package/package.json +38 -4
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { MQClient } from './mq_client.js';
|
|
2
|
+
import { PullAPI } from './pull_api.js';
|
|
3
|
+
import type { OffsetStore } from './offset_store.js';
|
|
4
|
+
import { MessageQueue, MessageExt } from '../common/message.js';
|
|
5
|
+
import type { AllocateMessageQueueStrategy } from './allocate.js';
|
|
6
|
+
import { SubscriptionData } from '../common/subscriptionData.js';
|
|
7
|
+
import type { MessageSelector } from './consumer_result.js';
|
|
8
|
+
export interface TopicMessageQueueChangeListener {
|
|
9
|
+
onChanged(topic: string, messageQueues: MessageQueue[]): void | Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export declare function litePullParkMillisFor(responseCode?: number): number;
|
|
12
|
+
export declare class DefaultLitePullConsumer {
|
|
13
|
+
consumerGroup: string;
|
|
14
|
+
namespace: string;
|
|
15
|
+
namespaceV2: string | null;
|
|
16
|
+
nameServerAddr: string;
|
|
17
|
+
messageModel: string;
|
|
18
|
+
consumeType: string;
|
|
19
|
+
get subscriptionDataSet(): SubscriptionData[];
|
|
20
|
+
private heartbeatSubscriptions;
|
|
21
|
+
unitMode: boolean;
|
|
22
|
+
instanceName: string;
|
|
23
|
+
unitName: string;
|
|
24
|
+
enableStreamRequestType: boolean;
|
|
25
|
+
clientID: string;
|
|
26
|
+
mqClient: MQClient | null;
|
|
27
|
+
pullAPI: PullAPI | null;
|
|
28
|
+
offsetStore: OffsetStore | null;
|
|
29
|
+
pullBatchSize: number;
|
|
30
|
+
pollTimeoutMillis: number;
|
|
31
|
+
autoCommit: boolean;
|
|
32
|
+
autoCommitIntervalMillis: number;
|
|
33
|
+
consumeFromWhere: string;
|
|
34
|
+
consumeTimestamp: string;
|
|
35
|
+
topicMetadataCheckIntervalMillis: number;
|
|
36
|
+
persistConsumerOffsetInterval: number;
|
|
37
|
+
useHeartbeatV2: boolean;
|
|
38
|
+
decodeReadBody: boolean;
|
|
39
|
+
mqClientApiTimeout: number;
|
|
40
|
+
enableConcurrentHeartbeat: boolean;
|
|
41
|
+
concurrentHeartbeatThreadPoolSize: number;
|
|
42
|
+
maxPageSizeInGetMetadata: number;
|
|
43
|
+
allocateMessageQueueStrategy: AllocateMessageQueueStrategy;
|
|
44
|
+
brokerSuspendMaxTimeMillis: number;
|
|
45
|
+
consumerTimeoutMillisWhenSuspend: number;
|
|
46
|
+
connectBrokerByUser: boolean;
|
|
47
|
+
defaultBrokerId: number;
|
|
48
|
+
setConsumeFromWhere(where: string): this;
|
|
49
|
+
setConsumeTimestamp(ts: string): this;
|
|
50
|
+
getConsumeTimestamp(): string;
|
|
51
|
+
private subscription;
|
|
52
|
+
private mode;
|
|
53
|
+
private assignedManual;
|
|
54
|
+
private assignedAuto;
|
|
55
|
+
private assignSubscription;
|
|
56
|
+
private paused;
|
|
57
|
+
private pullCursor;
|
|
58
|
+
private pullParkUntil;
|
|
59
|
+
private topicChangeListeners;
|
|
60
|
+
private messageQueuesForTopic;
|
|
61
|
+
private started;
|
|
62
|
+
private _serviceState;
|
|
63
|
+
private _rebalanceTimer;
|
|
64
|
+
private _autoCommitTimer;
|
|
65
|
+
private _metadataTimer;
|
|
66
|
+
private _metadataInitialTimer;
|
|
67
|
+
constructor(consumerGroup?: string);
|
|
68
|
+
setNamesrvAddr(addr: string): this;
|
|
69
|
+
setNamespace(ns: string): this;
|
|
70
|
+
getNamespace(): string;
|
|
71
|
+
setNamespaceV2(ns: string | null): this;
|
|
72
|
+
getNamespaceV2(): string | null;
|
|
73
|
+
setMessageModel(model: string): this;
|
|
74
|
+
setInstanceName(name: string): this;
|
|
75
|
+
setUnitName(name: string): this;
|
|
76
|
+
setPullBatchSize(n: number): this;
|
|
77
|
+
setPollTimeoutMillis(ms: number): this;
|
|
78
|
+
setAutoCommit(enable: boolean): this;
|
|
79
|
+
setAutoCommitIntervalMillis(ms: number): this;
|
|
80
|
+
setPersistConsumerOffsetInterval(ms: number): this;
|
|
81
|
+
getPersistConsumerOffsetInterval(): number;
|
|
82
|
+
setUseHeartbeatV2(enable: boolean): this;
|
|
83
|
+
getUseHeartbeatV2(): boolean;
|
|
84
|
+
setDecodeReadBody(enable: boolean): this;
|
|
85
|
+
getDecodeReadBody(): boolean;
|
|
86
|
+
setMqClientApiTimeout(ms: number): this;
|
|
87
|
+
getMqClientApiTimeout(): number;
|
|
88
|
+
setEnableConcurrentHeartbeat(enable: boolean): this;
|
|
89
|
+
getEnableConcurrentHeartbeat(): boolean;
|
|
90
|
+
setConcurrentHeartbeatThreadPoolSize(size: number): this;
|
|
91
|
+
getConcurrentHeartbeatThreadPoolSize(): number;
|
|
92
|
+
setMaxPageSizeInGetMetadata(size: number): this;
|
|
93
|
+
getMaxPageSizeInGetMetadata(): number;
|
|
94
|
+
getConsumerGroup(): string;
|
|
95
|
+
isStarted(): boolean;
|
|
96
|
+
getServiceState(): string;
|
|
97
|
+
setAllocateMessageQueueStrategy(strategy: AllocateMessageQueueStrategy): this;
|
|
98
|
+
getAllocateMessageQueueStrategy(): AllocateMessageQueueStrategy;
|
|
99
|
+
setBrokerSuspendMaxTimeMillis(ms: number): this;
|
|
100
|
+
getBrokerSuspendMaxTimeMillis(): number;
|
|
101
|
+
setConsumerTimeoutMillisWhenSuspend(ms: number): this;
|
|
102
|
+
getConsumerTimeoutMillisWhenSuspend(): number;
|
|
103
|
+
setConnectBrokerByUser(on: boolean): this;
|
|
104
|
+
isConnectBrokerByUser(): boolean;
|
|
105
|
+
setDefaultBrokerId(id: number): this;
|
|
106
|
+
getDefaultBrokerId(): number;
|
|
107
|
+
setTopicMetadataCheckIntervalMillis(ms: number): this;
|
|
108
|
+
getTopicMetadataCheckIntervalMillis(): number;
|
|
109
|
+
private claimMode;
|
|
110
|
+
private _withNamespace;
|
|
111
|
+
private _queueWithNamespace;
|
|
112
|
+
private _bareQueue;
|
|
113
|
+
private _resetMessagesTopic;
|
|
114
|
+
subscribe(topic: string, subExpression?: string): this;
|
|
115
|
+
unsubscribe(topic: string): void;
|
|
116
|
+
setSubExpressionForAssign(topic: string, subExpression: string): this;
|
|
117
|
+
buildSubscriptionsForHeartbeat(selectors: Map<string, MessageSelector> | null): this;
|
|
118
|
+
getSubscriptionsForHeartbeat(): SubscriptionData[];
|
|
119
|
+
assign(mqs: MessageQueue[]): this;
|
|
120
|
+
private dropQueueState;
|
|
121
|
+
private _checkConfig;
|
|
122
|
+
start(): Promise<void>;
|
|
123
|
+
shutdown(): Promise<void>;
|
|
124
|
+
private _doRebalance;
|
|
125
|
+
fetchMessageQueues(topic: string): Promise<MessageQueue[]>;
|
|
126
|
+
fetchSubscribeMessageQueues(topic: string): Promise<MessageQueue[]>;
|
|
127
|
+
registerTopicMessageQueueChangeListener(topic: string, listener: TopicMessageQueueChangeListener | null | undefined): Promise<void>;
|
|
128
|
+
fetchTopicMessageQueuesAndCompare(): Promise<number>;
|
|
129
|
+
private _startMetadataLoop;
|
|
130
|
+
poll(timeoutMillis?: number): Promise<MessageExt[]>;
|
|
131
|
+
commitSync(): Promise<void>;
|
|
132
|
+
persistConsumerOffset(): Promise<void>;
|
|
133
|
+
seek(mq: MessageQueue, offset: number): Promise<void>;
|
|
134
|
+
assignment(): MessageQueue[];
|
|
135
|
+
private _boundaryOffset;
|
|
136
|
+
private _maxOffsetFor;
|
|
137
|
+
private _searchOffsetFor;
|
|
138
|
+
seekToBegin(mq: MessageQueue): Promise<void>;
|
|
139
|
+
seekToEnd(mq: MessageQueue): Promise<void>;
|
|
140
|
+
offsetForTimestamp(mq: MessageQueue, timestamp: number): Promise<number>;
|
|
141
|
+
committed(mq: MessageQueue): Promise<number>;
|
|
142
|
+
pause(mqs: MessageQueue[]): void;
|
|
143
|
+
resume(mqs: MessageQueue[]): void;
|
|
144
|
+
setPullParkUntil(mq: MessageQueue, untilMillis: number): void;
|
|
145
|
+
getPullParkUntil(mq: MessageQueue): number;
|
|
146
|
+
private _parkMillisLeft;
|
|
147
|
+
private _sleepPollRound;
|
|
148
|
+
private _subscriptionFor;
|
|
149
|
+
private _assignedQueues;
|
|
150
|
+
private _activeQueues;
|
|
151
|
+
}
|