rocketmq-client-nodejs 1.0.2 → 1.0.5
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.md +84 -1
- package/dist/client/BaseClient.d.ts +24 -2
- package/dist/client/BaseClient.js +173 -28
- package/dist/client/ClientId.js +2 -2
- package/dist/client/Logger.d.ts +1 -0
- package/dist/client/Logger.js +1 -1
- package/dist/client/RpcClient.d.ts +3 -1
- package/dist/client/RpcClient.js +23 -1
- package/dist/client/RpcClientManager.d.ts +3 -1
- package/dist/client/RpcClientManager.js +23 -4
- package/dist/client/TelemetrySession.d.ts +1 -0
- package/dist/client/TelemetrySession.js +47 -9
- package/dist/consumer/Assignment.d.ts +24 -0
- package/dist/consumer/Assignment.js +40 -0
- package/dist/consumer/Assignments.d.ts +25 -0
- package/dist/consumer/Assignments.js +55 -0
- package/dist/consumer/ConsumeResult.d.ts +20 -0
- package/dist/consumer/ConsumeResult.js +25 -0
- package/dist/consumer/ConsumeService.d.ts +28 -0
- package/dist/consumer/ConsumeService.js +53 -0
- package/dist/consumer/ConsumeTask.d.ts +24 -0
- package/dist/consumer/ConsumeTask.js +39 -0
- package/dist/consumer/Consumer.d.ts +19 -1
- package/dist/consumer/Consumer.js +64 -21
- package/dist/consumer/FifoConsumeService.d.ts +25 -0
- package/dist/consumer/FifoConsumeService.js +130 -0
- package/dist/consumer/FilterExpression.d.ts +2 -0
- package/dist/consumer/FilterExpression.js +18 -1
- package/dist/consumer/LitePushConsumer.d.ts +161 -0
- package/dist/consumer/LitePushConsumer.js +172 -0
- package/dist/consumer/LitePushConsumerImpl.d.ts +167 -0
- package/dist/consumer/LitePushConsumerImpl.js +193 -0
- package/dist/consumer/LiteSubscriptionManager.d.ts +97 -0
- package/dist/consumer/LiteSubscriptionManager.js +236 -0
- package/dist/consumer/MessageListener.d.ts +21 -0
- package/dist/consumer/MessageListener.js +19 -0
- package/dist/consumer/OffsetOption.d.ts +109 -0
- package/dist/consumer/OffsetOption.js +191 -0
- package/dist/consumer/ProcessQueue.d.ts +39 -0
- package/dist/consumer/ProcessQueue.js +293 -0
- package/dist/consumer/PushConsumer.d.ts +88 -0
- package/dist/consumer/PushConsumer.js +449 -0
- package/dist/consumer/PushSubscriptionSettings.d.ts +31 -0
- package/dist/consumer/PushSubscriptionSettings.js +97 -0
- package/dist/consumer/SimpleConsumer.d.ts +12 -1
- package/dist/consumer/SimpleConsumer.js +54 -10
- package/dist/consumer/SimpleSubscriptionSettings.d.ts +2 -2
- package/dist/consumer/SimpleSubscriptionSettings.js +3 -3
- package/dist/consumer/StandardConsumeService.d.ts +25 -0
- package/dist/consumer/StandardConsumeService.js +50 -0
- package/dist/consumer/index.d.ts +15 -0
- package/dist/consumer/index.js +19 -1
- package/dist/exception/InternalErrorException.d.ts +5 -0
- package/dist/exception/InternalErrorException.js +10 -1
- package/dist/exception/LiteSubscriptionQuotaExceededException.d.ts +23 -0
- package/dist/exception/LiteSubscriptionQuotaExceededException.js +31 -0
- package/dist/exception/LiteTopicQuotaExceededException.d.ts +23 -0
- package/dist/exception/LiteTopicQuotaExceededException.js +31 -0
- package/dist/exception/StatusChecker.js +4 -1
- package/dist/exception/index.d.ts +2 -0
- package/dist/exception/index.js +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/message/Message.d.ts +8 -0
- package/dist/message/Message.js +39 -6
- package/dist/message/MessageId.d.ts +2 -0
- package/dist/message/MessageId.js +17 -1
- package/dist/message/MessageView.d.ts +86 -0
- package/dist/message/MessageView.js +115 -1
- package/dist/message/PublishingMessage.js +21 -5
- package/dist/producer/Producer.d.ts +21 -2
- package/dist/producer/Producer.js +120 -25
- package/dist/producer/PublishingLoadBalancer.d.ts +2 -0
- package/dist/producer/PublishingLoadBalancer.js +23 -1
- package/dist/producer/RecallReceipt.d.ts +25 -0
- package/dist/producer/RecallReceipt.js +34 -0
- package/dist/producer/SendReceipt.d.ts +2 -1
- package/dist/producer/SendReceipt.js +6 -3
- package/dist/producer/Transaction.js +7 -1
- package/dist/producer/index.d.ts +1 -0
- package/dist/producer/index.js +2 -1
- package/dist/route/Broker.d.ts +2 -0
- package/dist/route/Broker.js +21 -1
- package/dist/route/Endpoints.d.ts +2 -0
- package/dist/route/Endpoints.js +36 -1
- package/dist/route/MessageQueue.d.ts +2 -0
- package/dist/route/MessageQueue.js +23 -1
- package/dist/route/Resource.d.ts +54 -0
- package/dist/route/Resource.js +100 -0
- package/dist/route/TopicRouteData.d.ts +12 -0
- package/dist/route/TopicRouteData.js +37 -1
- package/dist/route/index.d.ts +1 -0
- package/dist/route/index.js +2 -1
- package/dist/util/index.d.ts +8 -0
- package/dist/util/index.js +20 -1
- package/package.json +2 -3
- package/proto/apache/rocketmq/v2/definition.proto +56 -0
- package/proto/apache/rocketmq/v2/definition_pb.d.ts +100 -0
- package/proto/apache/rocketmq/v2/definition_pb.js +570 -4
- package/proto/apache/rocketmq/v2/service.proto +65 -0
- package/proto/apache/rocketmq/v2/service_grpc_pb.d.ts +34 -0
- package/proto/apache/rocketmq/v2/service_grpc_pb.js +81 -4
- package/proto/apache/rocketmq/v2/service_pb.d.ts +211 -0
- package/proto/apache/rocketmq/v2/service_pb.js +1691 -25
- package/src/client/BaseClient.ts +196 -28
- package/src/client/ClientId.ts +1 -1
- package/src/client/Logger.ts +1 -0
- package/src/client/RpcClient.ts +26 -0
- package/src/client/RpcClientManager.ts +27 -3
- package/src/client/TelemetrySession.ts +54 -8
- package/src/consumer/Assignment.ts +40 -0
- package/src/consumer/Assignments.ts +55 -0
- package/src/consumer/ConsumeResult.ts +21 -0
- package/src/consumer/ConsumeService.ts +72 -0
- package/src/consumer/ConsumeTask.ts +39 -0
- package/src/consumer/Consumer.ts +76 -20
- package/src/consumer/FifoConsumeService.ts +146 -0
- package/src/consumer/FilterExpression.ts +17 -0
- package/src/consumer/LitePushConsumer.ts +256 -0
- package/src/consumer/LitePushConsumerImpl.ts +245 -0
- package/src/consumer/LiteSubscriptionManager.ts +352 -0
- package/src/consumer/MessageListener.ts +23 -0
- package/src/consumer/OffsetOption.ts +203 -0
- package/src/consumer/ProcessQueue.ts +339 -0
- package/src/consumer/PushConsumer.ts +563 -0
- package/src/consumer/PushSubscriptionSettings.ts +124 -0
- package/src/consumer/SimpleConsumer.ts +68 -11
- package/src/consumer/SimpleSubscriptionSettings.ts +2 -2
- package/src/consumer/StandardConsumeService.ts +57 -0
- package/src/consumer/index.ts +15 -0
- package/src/exception/InternalErrorException.ts +10 -0
- package/src/exception/LiteSubscriptionQuotaExceededException.ts +28 -0
- package/src/exception/LiteTopicQuotaExceededException.ts +28 -0
- package/src/exception/StatusChecker.ts +3 -0
- package/src/exception/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/message/Message.ts +46 -5
- package/src/message/MessageId.ts +16 -0
- package/src/message/MessageView.ts +127 -0
- package/src/message/PublishingMessage.ts +20 -4
- package/src/producer/Producer.ts +144 -24
- package/src/producer/PublishingLoadBalancer.ts +21 -0
- package/src/producer/RecallReceipt.ts +32 -0
- package/src/producer/SendReceipt.ts +5 -2
- package/src/producer/Transaction.ts +16 -0
- package/src/producer/index.ts +1 -0
- package/src/route/Broker.ts +20 -0
- package/src/route/Endpoints.ts +32 -0
- package/src/route/MessageQueue.ts +23 -1
- package/src/route/Resource.ts +104 -0
- package/src/route/TopicRouteData.ts +37 -0
- package/src/route/index.ts +1 -0
- package/src/util/index.ts +19 -0
|
@@ -401,6 +401,16 @@ export class SystemProperties extends jspb.Message {
|
|
|
401
401
|
getDeadLetterQueue(): DeadLetterQueue | undefined;
|
|
402
402
|
setDeadLetterQueue(value?: DeadLetterQueue): SystemProperties;
|
|
403
403
|
|
|
404
|
+
hasLiteTopic(): boolean;
|
|
405
|
+
clearLiteTopic(): void;
|
|
406
|
+
getLiteTopic(): string | undefined;
|
|
407
|
+
setLiteTopic(value: string): SystemProperties;
|
|
408
|
+
|
|
409
|
+
hasPriority(): boolean;
|
|
410
|
+
clearPriority(): void;
|
|
411
|
+
getPriority(): number | undefined;
|
|
412
|
+
setPriority(value: number): SystemProperties;
|
|
413
|
+
|
|
404
414
|
serializeBinary(): Uint8Array;
|
|
405
415
|
toObject(includeInstance?: boolean): SystemProperties.AsObject;
|
|
406
416
|
static toObject(includeInstance: boolean, msg: SystemProperties): SystemProperties.AsObject;
|
|
@@ -433,6 +443,8 @@ export namespace SystemProperties {
|
|
|
433
443
|
traceContext?: string,
|
|
434
444
|
orphanedTransactionRecoveryDuration?: google_protobuf_duration_pb.Duration.AsObject,
|
|
435
445
|
deadLetterQueue?: DeadLetterQueue.AsObject,
|
|
446
|
+
liteTopic?: string,
|
|
447
|
+
priority?: number,
|
|
436
448
|
}
|
|
437
449
|
}
|
|
438
450
|
|
|
@@ -701,6 +713,16 @@ export class Subscription extends jspb.Message {
|
|
|
701
713
|
getLongPollingTimeout(): google_protobuf_duration_pb.Duration | undefined;
|
|
702
714
|
setLongPollingTimeout(value?: google_protobuf_duration_pb.Duration): Subscription;
|
|
703
715
|
|
|
716
|
+
hasLiteSubscriptionQuota(): boolean;
|
|
717
|
+
clearLiteSubscriptionQuota(): void;
|
|
718
|
+
getLiteSubscriptionQuota(): number | undefined;
|
|
719
|
+
setLiteSubscriptionQuota(value: number): Subscription;
|
|
720
|
+
|
|
721
|
+
hasMaxLiteTopicSize(): boolean;
|
|
722
|
+
clearMaxLiteTopicSize(): void;
|
|
723
|
+
getMaxLiteTopicSize(): number | undefined;
|
|
724
|
+
setMaxLiteTopicSize(value: number): Subscription;
|
|
725
|
+
|
|
704
726
|
serializeBinary(): Uint8Array;
|
|
705
727
|
toObject(includeInstance?: boolean): Subscription.AsObject;
|
|
706
728
|
static toObject(includeInstance: boolean, msg: Subscription): Subscription.AsObject;
|
|
@@ -718,6 +740,8 @@ export namespace Subscription {
|
|
|
718
740
|
fifo?: boolean,
|
|
719
741
|
receiveBatchSize?: number,
|
|
720
742
|
longPollingTimeout?: google_protobuf_duration_pb.Duration.AsObject,
|
|
743
|
+
liteSubscriptionQuota?: number,
|
|
744
|
+
maxLiteTopicSize?: number,
|
|
721
745
|
}
|
|
722
746
|
}
|
|
723
747
|
|
|
@@ -747,6 +771,65 @@ export namespace Metric {
|
|
|
747
771
|
}
|
|
748
772
|
}
|
|
749
773
|
|
|
774
|
+
export class OffsetOption extends jspb.Message {
|
|
775
|
+
|
|
776
|
+
hasPolicy(): boolean;
|
|
777
|
+
clearPolicy(): void;
|
|
778
|
+
getPolicy(): OffsetOption.Policy;
|
|
779
|
+
setPolicy(value: OffsetOption.Policy): OffsetOption;
|
|
780
|
+
|
|
781
|
+
hasOffset(): boolean;
|
|
782
|
+
clearOffset(): void;
|
|
783
|
+
getOffset(): number;
|
|
784
|
+
setOffset(value: number): OffsetOption;
|
|
785
|
+
|
|
786
|
+
hasTailN(): boolean;
|
|
787
|
+
clearTailN(): void;
|
|
788
|
+
getTailN(): number;
|
|
789
|
+
setTailN(value: number): OffsetOption;
|
|
790
|
+
|
|
791
|
+
hasTimestamp(): boolean;
|
|
792
|
+
clearTimestamp(): void;
|
|
793
|
+
getTimestamp(): number;
|
|
794
|
+
setTimestamp(value: number): OffsetOption;
|
|
795
|
+
|
|
796
|
+
getOffsetTypeCase(): OffsetOption.OffsetTypeCase;
|
|
797
|
+
|
|
798
|
+
serializeBinary(): Uint8Array;
|
|
799
|
+
toObject(includeInstance?: boolean): OffsetOption.AsObject;
|
|
800
|
+
static toObject(includeInstance: boolean, msg: OffsetOption): OffsetOption.AsObject;
|
|
801
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
802
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
803
|
+
static serializeBinaryToWriter(message: OffsetOption, writer: jspb.BinaryWriter): void;
|
|
804
|
+
static deserializeBinary(bytes: Uint8Array): OffsetOption;
|
|
805
|
+
static deserializeBinaryFromReader(message: OffsetOption, reader: jspb.BinaryReader): OffsetOption;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
export namespace OffsetOption {
|
|
809
|
+
export type AsObject = {
|
|
810
|
+
policy: OffsetOption.Policy,
|
|
811
|
+
offset: number,
|
|
812
|
+
tailN: number,
|
|
813
|
+
timestamp: number,
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export enum Policy {
|
|
817
|
+
LAST = 0,
|
|
818
|
+
MIN = 1,
|
|
819
|
+
MAX = 2,
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
export enum OffsetTypeCase {
|
|
824
|
+
OFFSET_TYPE_NOT_SET = 0,
|
|
825
|
+
POLICY = 1,
|
|
826
|
+
OFFSET = 2,
|
|
827
|
+
TAIL_N = 3,
|
|
828
|
+
TIMESTAMP = 4,
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
}
|
|
832
|
+
|
|
750
833
|
export enum TransactionResolution {
|
|
751
834
|
TRANSACTION_RESOLUTION_UNSPECIFIED = 0,
|
|
752
835
|
COMMIT = 1,
|
|
@@ -786,6 +869,8 @@ export enum MessageType {
|
|
|
786
869
|
FIFO = 2,
|
|
787
870
|
DELAY = 3,
|
|
788
871
|
TRANSACTION = 4,
|
|
872
|
+
LITE = 5,
|
|
873
|
+
PRIORITY = 6,
|
|
789
874
|
}
|
|
790
875
|
|
|
791
876
|
export enum DigestType {
|
|
@@ -801,6 +886,8 @@ export enum ClientType {
|
|
|
801
886
|
PUSH_CONSUMER = 2,
|
|
802
887
|
SIMPLE_CONSUMER = 3,
|
|
803
888
|
PULL_CONSUMER = 4,
|
|
889
|
+
LITE_PUSH_CONSUMER = 5,
|
|
890
|
+
LITE_SIMPLE_CONSUMER = 6,
|
|
804
891
|
}
|
|
805
892
|
|
|
806
893
|
export enum Encoding {
|
|
@@ -832,6 +919,8 @@ export enum Code {
|
|
|
832
919
|
MESSAGE_CORRUPTED = 40016,
|
|
833
920
|
CLIENT_ID_REQUIRED = 40017,
|
|
834
921
|
ILLEGAL_POLLING_TIME = 40018,
|
|
922
|
+
ILLEGAL_OFFSET = 40019,
|
|
923
|
+
ILLEGAL_LITE_TOPIC = 40020,
|
|
835
924
|
UNAUTHORIZED = 40100,
|
|
836
925
|
PAYMENT_REQUIRED = 40200,
|
|
837
926
|
FORBIDDEN = 40300,
|
|
@@ -839,11 +928,15 @@ export enum Code {
|
|
|
839
928
|
MESSAGE_NOT_FOUND = 40401,
|
|
840
929
|
TOPIC_NOT_FOUND = 40402,
|
|
841
930
|
CONSUMER_GROUP_NOT_FOUND = 40403,
|
|
931
|
+
OFFSET_NOT_FOUND = 40404,
|
|
842
932
|
REQUEST_TIMEOUT = 40800,
|
|
843
933
|
PAYLOAD_TOO_LARGE = 41300,
|
|
844
934
|
MESSAGE_BODY_TOO_LARGE = 41301,
|
|
935
|
+
MESSAGE_BODY_EMPTY = 41302,
|
|
845
936
|
PRECONDITION_FAILED = 42800,
|
|
846
937
|
TOO_MANY_REQUESTS = 42900,
|
|
938
|
+
LITE_TOPIC_QUOTA_EXCEEDED = 42901,
|
|
939
|
+
LITE_SUBSCRIPTION_QUOTA_EXCEEDED = 42902,
|
|
847
940
|
REQUEST_HEADER_FIELDS_TOO_LARGE = 43100,
|
|
848
941
|
MESSAGE_PROPERTIES_TOO_LARGE = 43101,
|
|
849
942
|
INTERNAL_ERROR = 50000,
|
|
@@ -875,6 +968,13 @@ export enum Language {
|
|
|
875
968
|
KOTLIN = 12,
|
|
876
969
|
}
|
|
877
970
|
|
|
971
|
+
export enum LiteSubscriptionAction {
|
|
972
|
+
PARTIAL_ADD = 0,
|
|
973
|
+
PARTIAL_REMOVE = 1,
|
|
974
|
+
COMPLETE_ADD = 2,
|
|
975
|
+
COMPLETE_REMOVE = 3,
|
|
976
|
+
}
|
|
977
|
+
|
|
878
978
|
export enum QueryOffsetPolicy {
|
|
879
979
|
BEGINNING = 0,
|
|
880
980
|
END = 1,
|