Skip to main content
Version: 1.6.0

HTTP API

1 Master metadata configuration API

1.1 Cluster management API

1.1.1 admin_online_broker_configure

The online configuration of the Brokers are new or offline. The configuration of Topics are distributed to related Brokers as well.

Request

namemustdescriptiontype
brokerIdyesThe broker ID. It supports bulk brokerId which is separated by ,. The maximum number of a bulk is 50. The brokerId should be distinct in case of bulk valueint
modifyUseryesThe user who executes thisString
modifyDatenoThe modify date in the format of "yyyyMMddHHmmss"String
confModAuthTokenyesThe authorization keyString

Response

namedescriptiontype
codeReturns 0 if success, otherwise failedint
errMsg"OK" if success, other return error messagestring

1.1.2 admin_reload_broker_configure

Update the configuration of the Brokers which are online. The new configuration will be published to Broker server, it will return error if the broker is offline.

Request

namemustdescriptiontype
brokerIdyesthe id of broker. It supports bulk brokerId which separated by ,. The maximum
number of a bulk is 50. The brokerId should be distinct in case of bulk value
int
modifyUseryesthe user who executes thisString
modifyDatenothe modify date in the format of "yyyyMMddHHmmss"String
confModAuthTokenyesthe authorization keyString

Response

namedescriptiontype
codereturn 0 if success, otherwise failedint
errMsg"OK" if success, other return error messagestring

1.1.3 admin_offline_broker_configure

Offline the configuration of the Brokers which are online. It should be called before Broker offline or retired. The Broker processes can be terminated once all offline tasks are done.

Request

namemustdescriptiontype
brokerIdyesthe id of broker. It supports bulk brokerId which separated by ,. The maximum
number of a bulk is 50. The brokerId should be distinct in case of bulk value
int
modifyUseryesthe user who executes thisString
modifyDatenothe modify date in the format of "yyyyMMddHHmmss"String
confModAuthTokenyesthe authorization keyString

Response

namedescriptiontype
codereturn 0 if success, otherwise failedint
errMsg"OK" if success, other return error messagestring

1.1.4 admin_set_broker_read_or_write

Set Broker into a read-only or write-only state. Only Brokers are online and idle can be handled.

Request

namemustdescriptiontype
brokerIdyesthe id of broker. It supports bulk brokerId which separated by ,. The maximum
number of a bulk is 50. The brokerId should be distinct in case of bulk value
int
isAcceptPublishyeswhether the brokers accept publish requests, default is trueBoolean
isAcceptSubscribenowhether the brokers accept subscribe requests, default is trueBoolean
modifyUseryesthe user who request the change, default is creatorString
modifyDatenothe modify date in the format of "yyyyMMddHHmmss"String
confModAuthTokenyesthe authorization keyString

Response

namedescriptiontype
codereturn 0 if success, otherwise failedint
errMsg"OK" if success, other return error messagestring

1.1.5 admin_query_broker_run_status

Query Broker status. Only the Brokers processes are offline and idle can be terminated.

Request

namemustdescriptiontype
brokerIdyesthe id of broker. It supports bulk brokerId which separated by ,. The maximum
number of a bulk is 50. The brokerId should be distinct in case of bulk value
int
onlyAbnormalnoonly report abnormal set, default is falseBoolean
onlyAutoForbiddennoonly auto forbidden set, default is falseBoolean
onlyEnableTLSnoonly enable TLS set, default is falseBoolean
withDetailyeswhether it needs detail, default is falseBoolean

Response

namedescriptiontype
codereturn 0 if success, otherwise failedint
errMsg"OK" if success, other return error messagestring

1.1.6 admin_release_broker_autoforbidden_status

Release the brokers' auto forbidden status.

Request

namemustdescriptiontype
brokerIdyesthe id of broker. It supports bulk brokerId which separated by ,. The maximum
number of a bulk is 50. The brokerId should be distinct in case of bulk value
int
realReasonyesthe reason of why it needs to releaseString
modifyUseryesthe user who request the change, default is creatorString
modifyDatenothe modify date in the format of "yyyyMMddHHmmss"String
confModAuthTokenyesthe authorization keyString

Response

namedescriptiontype
codereturn 0 if success, otherwise failedint
errMsg"OK" if success, other return error messagestring

1.1.7 admin_query_master_group_info

Query the detail of master cluster nodes.

1.1.8 admin_transfer_current_master

Set current master node as backup node, let it select another master.

1.9 groupAdmin.sh

Clean the invalid node inside master group.

Request

namemustdescriptiontype
groupNameyesthe name of master groupString
helperHostyesthe address of an online master node which will connect. The format is ip:portString
nodeName2Removenothe group node to be cleanString

Response

namedescriptiontype
codereturn 0 if success, otherwise failedint
errMsg"OK" if success, other return error messagestring

1.2 Broker node configuration API

1.2.1 admin_add_broker_configure

Add broker default configuration (not include topic info). It will be effective after calling load API.

Request

namemustdescriptiontype
brokerIpyesa ip v4 addressstring
brokerPortnothe port of broker. Default is 8123Int
brokerIdyesthe id of the broker, its default value is 0. If brokerId is not zero, it ignores brokerIp fieldString
deleteWhennothe default deleting time of the topic data. The format should like cronjob form 0 0 6, 18 * * ?String
deletePolicynothe default policy for deleting, the default policy is "delete, 168"String
numPartitionsnothe default partition number of a default topic on the broker. Default 1Int
unflushThresholdnothe maximum message number which allows in memory. It has to be flushed to disk if the number exceed this value. Default 1000Int
numTopicStoresnothe number of data block and partition group allowed to create, default 1. If it is larger than 1, the partition number and topic number should be mapping with this valueInt
unflushIntervalnothe maximum interval for unflush, default 1000msInt
memCacheMsgCntInKnothe max cached message package, default is 10, the unit is KInt
memCacheMsgSizeInMBnothe max cache message size in MB, default 3Int
memCacheFlushIntvlnothe max unflush interval in ms, default 20000Int
brokerTLSPortnothe port of TLS of the broker, it has no default valueInt
acceptPublishnowhether the broker accept publish, default trueBoolean
acceptSubscribenowhether the broker accept subscribe, default trueBoolean
createUseryesthe create userString
createDateyesthe create date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

1.2.2 admin_batch_add_broker_configure

Add broker default configuration in batch (not include topic info). It will be effective after calling load API.

This API take a json string referred as brokerJsonSet as input parameter. The content of Json contains the configuration lists in admin_add_broker_configure

Request

namemustdescriptiontype
brokerJsonSetyesthe parameter for the configurationString
createUseryesthe creatorString
createDateyesthe create date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

1.2.3 admin_update_broker_configure

Update broker default configuration (not include topic info). It will be effective after calling load API.

Request

namemustdescriptiontype
brokerIdyesthe id of the broker. It supports bulk operation by providing id set here. The brokerId should separated by , and be distinctString
brokerPortnothe port of broker. Default is 8123Int
deleteWhennothe default deleting time of the topic data. The format should like cronjob form 0 0 6, 18 * * ?String
deletePolicynothe default policy for deleting, the default policy is "delete, 168"String
numPartitionsnothe default partition number of a default topic on the broker. Default 1Int
unflushThresholdnothe maximum message number which allows in memory. It has to be flushed to disk if the number exceed this value. Default 1000Int
numTopicStoresnothe number of data block and partition group allowed to create, default 1. If it is larger than 1, the partition number and topic number should be mapping with this valueInt
unflushIntervalnothe maximum interval for unflush, default 1000msInt
memCacheMsgCntInKnothe max cached message package, default is 10, the unit is KInt
memCacheMsgSizeInMBnothe max cache message size in MB, default 3Int
memCacheFlushIntvlnothe max unflush interval in ms, default 20000Int
brokerTLSPortnothe port of TLS of the broker, it has no default valueInt
acceptPublishnowhether the broker accept publish, default trueBoolean
acceptSubscribenowhether the broker accept subscribe, default trueBoolean
modifyUseryesthe modifierString
modifyDateyesthe modify date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

1.2.4 admin_query_broker_configure

Query the broker configuration.

Request

namemustdescriptiontype
brokerIdyesthe id of the broker. It supports bulk operation by providing id set here. The brokerId should separated by , and be distinctString
brokerPortnothe port of broker. Default is 8123Int
deleteWhennothe default deleting time of the topic data. The format should like cronjob form 0 0 6, 18 * * ?String
deletePolicynothe default policy for deleting, the default policy is "delete, 168"String
numPartitionsnothe default partition number of a default topic on the broker. Default 1Int
unflushThresholdnothe maximum message number which allows in memory. It has to be flushed to disk if the number exceed this value. Default 1000Int
numTopicStoresnothe number of data block and partition group allowed to create, default 1. If it is larger than 1, the partition number and topic number should be mapping with this valueInt
unflushIntervalnothe maximum interval for unflush, default 1000msInt
memCacheMsgCntInKnothe max cached message package, default is 10, the unit is KInt
memCacheMsgSizeInMBnothe max cache message size in MB, default 3Int
memCacheFlushIntvlnothe max unflush interval in ms, default 20000Int
brokerTLSPortnothe port of TLS of the broker, it has no default valueInt
acceptPublishnowhether the broker accept publish, default trueBoolean
acceptSubscribenowhether the broker accept subscribe, default trueBoolean
createUseryesthe creator to be queryString
modifyUseryesthe modifier to be queryString
topicStatusIdyesthe status of topic recordint
withTopicnowhether it needs topic configurationBoolean

1.2.5 admin_delete_broker_configure

Delete the broker's default configuration. It requires the related topic configuration to be delete at first, and the broker should be offline.

Request

namemustdescriptiontype
brokerIdyesthe id of the broker. It supports bulk operation by providing id set here. The brokerId should separated by , and be distinctString
modifyUseryesthe modifierString
modifyDatenothe modifying date in format yyyyMMddHHmmssString
isReserveDatanowhether to reserve production data, default falseBoolean
confModAuthTokenyesthe authorized key for configuration updateString

1.3 Topic configuration API

1.3.1 admin_add_new_topic_record

Add topic related configuration.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
brokerIdyesthe id of the broker, its default value is 0. If brokerId is not zero, it ignores brokerIp fieldString
deleteWhennothe default deleting time of the topic data. The format should like cronjob form 0 0 6, 18 * * ?String
deletePolicynothe default policy for deleting, the default policy is "delete, 168"String
numPartitionsnothe default partition number of a default topic on the broker. Default 1Int
unflushThresholdnothe maximum message number which allows in memory. It has to be flushed to disk if the number exceed this value. Default 1000Int
numTopicStoresnothe number of data block and partition group allowed to create, default 1. If it is larger than 1, the partition number and topic number should be mapping with this valueInt
unflushIntervalnothe maximum interval for unflush, default 1000msInt
memCacheMsgCntInKnothe max cached message package, default is 10, the unit is KInt
memCacheMsgSizeInMBnothe max cache message size in MB, default 3Int
memCacheFlushIntvlnothe max unflush interval in ms, default 20000Int
brokerTLSPortnothe port of TLS of the broker, it has no default valueInt
acceptPublishnowhether the broker accept publish, default trueBoolean
acceptSubscribenowhether the broker accept subscribe, default trueBoolean
createUseryesthe create userString
createDateyesthe create date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

1.3.2 admin_query_topic_info

Query specific topic record info.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
topicStatusIdnothe status of topic record, 0-normal record, 1-already soft delete, 2-already hard delete, default 0int
brokerIdyesthe id of the broker, its default value is 0. If brokerId is not zero, it ignores brokerIp fieldString
deleteWhennothe default deleting time of the topic data. The format should like cronjob form 0 0 6, 18 * * ?String
deletePolicynothe default policy for deleting, the default policy is "delete, 168"String
numPartitionsnothe default partition number of a default topic on the broker. Default 3Int
unflushThresholdnothe maximum message number which allows in memory. It has to be flushed to disk if the number exceed this value. Default 1000Int
numTopicStoresnothe number of data block and partition group allowed to create, default 1. If it is larger than 1, the partition number and topic number should be mapping with this valueInt
unflushIntervalnothe maximum interval for unflush, default 1000msInt
memCacheMsgCntInKnothe max cached message package, default is 10, the unit is KInt
memCacheMsgSizeInMBnothe max cache message size in MB, default 3Int
memCacheFlushIntvlnothe max unflush interval in ms, default 20000Int
brokerTLSPortnothe port of TLS of the broker, it has no default valueInt
acceptPublishnowhether the broker accept publish, default trueBoolean
acceptSubscribenowhether the broker accept subscribe, default trueBoolean
createUseryesthe creatorString
modifyUseryesthe modifierString

1.3.3 admin_modify_topic_info

Modify specific topic record info.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
topicStatusIdnothe status of topic record, 0-normal record, 1-already soft delete, 2-already hard delete, default 0int
brokerIdyesthe id of the broker, its default value is 0. If brokerId is not zero, it ignores brokerIp fieldString
deleteWhennothe default deleting time of the topic data. The format should like cronjob form 0 0 6, 18 * * ?String
deletePolicynothe default policy for deleting, the default policy is "delete, 168"String
numPartitionsnothe default partition number of a default topic on the broker. Default 3Int
unflushThresholdnothe maximum message number which allows in memory. It has to be flushed to disk if the number exceed this value. Default 1000Int
numTopicStoresnothe number of data block and partition group allowed to create, default 1. If it is larger than 1, the partition number and topic number should be mapping with this valueInt
unflushIntervalnothe maximum interval for unflush, default 1000msInt
memCacheMsgCntInKnothe max cached message package, default is 10, the unit is KInt
memCacheMsgSizeInMBnothe max cache message size in MB, default 3Int
memCacheFlushIntvlnothe max unflush interval in ms, default 20000Int
brokerTLSPortnothe port of TLS of the broker, it has no default valueInt
acceptPublishnowhether the broker accept publish, default trueBoolean
acceptSubscribenowhether the broker accept subscribe, default trueBoolean
modifyUseryesthe modifierString
modifyDateyesthe modification date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

1.3.4 admin_delete_topic_info

Delete specific topic record info softly.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
brokerIdyesthe id of the broker, its default value is 0. If brokerId is not zero, it ignores brokerIp fieldString
modifyUseryesthe modifierString
modifyDateyesthe modification date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

1.3.4 admin_redo_deleted_topic_info

Redo the Deleted specific topic record info.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
brokerIdyesthe id of the broker, its default value is 0. If brokerId is not zero, it ignores brokerIp fieldString
modifyUseryesthe modifierString
modifyDateyesthe modification date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

1.3.5 admin_remove_topic_info

Delete specific topic record info hardly.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
brokerIdyesthe id of the broker, its default value is 0. If brokerId is not zero, it ignores brokerIp fieldString
modifyUseryesthe modifierString
modifyDateyesthe modification date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

1.3.6 admin_query_broker_topic_config_info

Query the topic configuration info of the broker in current cluster.

Request

namemustdescriptiontype
topicNameyesthe topic nameString

2 Master consumer permission operation API

2.1 admin_set_topic_info_authorize_control

Enable or disable the authorization control feature of the topic. If the consumer group is not authorized, the register request will be denied. If the topic's authorization group is empty, the topic will fail.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
createUseryesthe creatorString
createDatenothe creating date in format yyyyMMddHHmmssString
isEnablenowhether the authorization control is enable, default falseBoolean
confModAuthTokenyesthe authorized key for configuration updateString

2.2 admin_delete_topic_info_authorize_control

Delete the authorization control feature of the topic. The content of the authorized consumer group list will be delete as well.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
createUseryesthe creatorString
confModAuthTokenyesthe authorized key for configuration updateString

2.3 admin_query_topic_info_authorize_control

Query the authorization control feature of the topic.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
createUseryesthe creatorString

2.4 admin_add_authorized_consumergroup_info

Add new authorized consumer group record of the topic. The server will deny the registration from the consumer group which is not exist in topic's authorized consumer group.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
groupNameyesthe group name to be addedString
createUseryesthe creatorString
createDatenothe creating date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

2.5 admin_query_allowed_consumer_group_info

Query the authorized consumer group record of the topic.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
groupNameyesthe group name to be addedString
createUseryesthe creatorString

2.6 admin_delete_allowed_consumer_group_info

Delete the authorized consumer group record of the topic.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
groupNameyesthe group name to be addedString
confModAuthTokenyesthe authorized key for configuration updateString

2.7admin_batch_add_topic_authorize_control

Add the authorized consumer group of the topic record in batch mode.

Request

namemustdescriptiontype
topicJsonSetyesthe topic names in JSON formatList
createUseryesthe creatorString
createDatenothe creating date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

2.8 admin_batch_add_authorized_consumergroup_info

Add the authorized consumer group record in batch mode.

Request

namemustdescriptiontype
groupNameJsonSetyesthe group names in JSON formatList
createUseryesthe creatorString
createDatenothe creating date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

2.9 admin_add_black_consumergroup_info

Add consumer group into the black list of the topic. The registered consumer on the group cannot consume topic later as well as unregistered one.

Request

namemustdescriptiontype
topicNameyesthe topic nameList
groupNameyesthe group nameList
createUseryesthe creatorString
createDatenothe creating date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

2.10 admin_query_black_consumergroup_info

Query the black list of the topic.

Request

namemustdescriptiontype
topicNameyesthe topic nameList
groupNameyesthe group nameList
createUseryesthe creatorString

2.11 admin_delete_black_consumergroup_info

Delete the black list of the topic.

Request

namemustdescriptiontype
topicNameyesthe topic nameList
groupNameyesthe group nameList
confModAuthTokenyesthe authorized key for configuration updateString

2.12 admin_add_group_filtercond_info

Add condition of consuming filter for the consumer group

Request

namemustdescriptiontype
topicNameyesthe topic nameList
groupNameyesthe group nameList
confModAuthTokenyesthe authorized key for configuration updateString
condStatusnothe condition status, 0: disable, 1:enable full authorization, 2:enable and limit consumingInt
filterCondsnothe filter conditions, the max length is 256String
createUseryesthe creatorString
createDatenothe creating date in format yyyyMMddHHmmssString

2.13 admin_mod_group_filtercond_info

Modify the condition of consuming filter for the consumer group

Request

namemustdescriptiontype
topicNameyesthe topic nameList
groupNameyesthe group nameList
confModAuthTokenyesthe authorized key for configuration updateString
condStatusnothe condition status, 0: disable, 1:enable full authorization, 2:enable and limit consumingInt
filterCondsnothe filter conditions, the max length is 256String
modifyUseryesthe modifierString
modifyDatenothe modification date in format yyyyMMddHHmmssString

2.14 admin_del_group_filtercond_info

Delete the condition of consuming filter for the consumer group

Request

namemustdescriptiontype
topicNameyesthe topic nameList
groupNameyesthe group nameList
confModAuthTokenyesthe authorized key for configuration updateString

2.15 admin_query_group_filtercond_info

Query the condition of consuming filter for the consumer group

Request

namemustdescriptiontype
topicNameyesthe topic nameList
groupNameyesthe group nameList
condStatusnothe condition status, 0: disable, 1:enable full authorization, 2:enable and limit consumingInt
filterCondsnothe filter conditions, the max length is 256String

2.16 admin_rebalance_group_allocate

Adjust consuming partition of the specific consumer in consumer group. This includes: \

  1. release current consuming partition and retrieve new consuming partition.
  2. release current consuming partition and stop consuming for a while, then retrieve new consuming partition.

Request

namemustdescriptiontype
confModAuthTokenyesthe authorized key for configuration updateString
consumerIdyesthe consumer idList
groupNameyesthe group nameList
reJoinWaitnothe time in ms wait for re-consuming, the default value is 0 which means re-consuming immediatelyInt
modifyUseryesthe modifierString
modifyDateyesthe modification date in format yyyyMMddHHmmssString

2.17 admin_set_def_flow_control_rule

Set default flow control rule. It is effective for all consumer group. It worth to note that the priority is lower than the setting in consumer group.

The flow control info is described in JSON format, for example:

[{"type":0,"rule":[{"start":"08:00","end":"17:59","dltInM":1024,"limitInM":20,"freqInMs":1000},{"start":"18:00","end":"22:00","dltInM":1024,"limitInM":20,"freqInMs":5000}]},{"type":2,"rule":[{"start":"18:00","end":"23:59","dltStInM":20480,"dltEdInMM":2048}]},{"type":1,"rule":[{"zeroCnt":3,"freqInMs":300},{"zeroCnt":8,"freqInMs":1000}]},{"type":3,"rule":[{"normFreqInMs":0,"filterFreqInMs":100,"minDataFilterFreqInMs":400}]}]

The type has four values [0, 1, 3]. 0: flow control, 1: frequency control, 3: filter consumer frequency control,
[start, end] is an inclusive range of time, dltInM is the consuming delta in MB, limitInM is the flow control each minute,
freqInMs is the interval for sending request after exceeding the flow or freq limit, zeroCnt is the count of how many times occurs zero data,
normFreqInMs is the interval of sequential pulling, filterFreqInMs is the interval of pulling filtered request.

Request

namemustdescriptiontype
flowCtrlInfoyesthe flow control info in JSON formatString
confModAuthTokenyesthe authorized key for configuration updateString
consumerIdyesthe consumer idList
groupNameyesthe group nameList
reJoinWaitnothe time in ms wait for re-consuming, the default value is 0 which means re-consuming immediatelyInt
modifyUseryesthe modifierString
modifyDateyesthe modification date in format yyyyMMddHHmmssString

2.18 admin_upd_def_flow_control_rule

Update the default flow control rule.

Request

namemustdescriptiontype
confModAuthTokenyesthe authorized key for configuration updateString
StatusIdnothe strategy status Id, default 0int
qryPriorityIdnothe consuming priority Id. It is a composed field A0B with default value 301,
the value of A,B is [1, 2, 3] which means file, backup memory, and main memory respectively
int
createUseryesthe creatorString
flowCtrlInfoyesthe flow control info in JSON formatString
createDateyesthe creating date in format yyyyMMddHHmmssString

2.19 admin_query_def_flow_control_rule

Query the default flow control rule.

Request

namemustdescriptiontype
StatusIdnothe strategy status Id, default 0int
qryPriorityIdnothe consuming priority Id. It is a composed field A0B with default value 301,
the value of A,B is [1, 2, 3] which means file, backup memory, and main memory respectively
int
createUseryesthe creatorString

2.20 admin_set_group_flow_control_rule

Set the group flow control rule.

Request

namemustdescriptiontype
flowCtrlInfoyesthe flow control info in JSON formatString
groupNameyesthe group name to set flow control ruleString
confModAuthTokenyesthe authorized key for configuration updateString
StatusIdnothe strategy status Id, default 0int
qryPriorityIdnothe consuming priority Id. It is a composed field A0B with default value 301,
the value of A,B is [1, 2, 3] which means file, backup memory, and main memory respectively
int
createUseryesthe creatorString
createDateyesthe creating date in format yyyyMMddHHmmssString

2.21 admin_upd_group_flow_control_rule

Update the group flow control rule.

Request

namemustdescriptiontype
flowCtrlInfoyesthe flow control info in JSON formatString
groupNameyesthe group name to set flow control ruleString
confModAuthTokenyesthe authorized key for configuration updateString
StatusIdnothe strategy status Id, default 0int
qryPriorityIdnothe consuming priority Id. It is a composed field A0B with default value 301,
the value of A,B is [1, 2, 3] which means file, backup memory, and main memory respectively
int
createUseryesthe creatorString
createDateyesthe creating date in format yyyyMMddHHmmssString

2.22 admin_rmv_group_flow_control_rule

Remove the group flow control rule.

Request

namemustdescriptiontype
groupNameyesthe group name to set flow control ruleString
confModAuthTokenyesthe authorized key for configuration updateString
createUseryesthe creatorString

2.23 admin_query_group_flow_control_rule

Remove the group flow control rule.

Request

namemustdescriptiontype
groupNameyesthe group name to set flow control ruleString
StatusIdnothe strategy status Id, default 0int
qryPriorityIdnothe consuming priority Id. It is a composed field A0B with default value 301,
the value of A,B is [1, 2, 3] which means file, backup memory, and main memory respectively
int
createUseryesthe creatorString

2.24 admin_add_consume_group_setting

Set whether to allow consume group to consume via specific offset, and the ratio of broker and client when starting the consume group.

Request

namemustdescriptiontype
groupNameyesthe group name to set flow control ruleString
enableBindnowhether to bind consuming permission, default value 0 means disableint
allowedBClientRatenothe ratio of the number of the consuming target's broker against the number of client in consuming groupint
createUseryesthe creatorString
createDateyesthe creating date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

2.25 admin_query_consume_group_setting

Query the consume group setting to check whether to allow consume group to consume via specific offset, and the ratio of broker and client when starting the consume group.

Request

namemustdescriptiontype
groupNameyesthe group name to set flow control ruleString
enableBindnowhether to bind consuming permission, default value 0 means disableint
allowedBClientRatenothe ratio of the number of the consuming target's broker against the number of client in consuming groupint
createUseryesthe creatorString

2.26 admin_upd_consume_group_setting

Update the consume group setting for whether to allow consume group to consume via specific offset, and the ratio of broker and client when starting the consume group.

Request

namemustdescriptiontype
groupNameyesthe group name to set flow control ruleString
enableBindnowhether to bind consuming permission, default value 0 means disableint
allowedBClientRatenothe ratio of the number of the consuming target's broker against the number of client in consuming groupint
modifyUseryesthe modifierString
modifyDateyesthe modifying date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

2.27 admin_del_consume_group_setting

Delete the consume group setting for whether to allow consume group to consume via specific offset, and the ratio of broker and client when starting the consume group.

Request

namemustdescriptiontype
groupNameyesthe group name to set flow control ruleString
modifyUseryesthe modifierString
modifyDateyesthe modifying date in format yyyyMMddHHmmssString
confModAuthTokenyesthe authorized key for configuration updateString

3 Master subscriber relation API

3.1 Query consumer group subscription information

Url http://127.0.0.1:8080/webapi.htm?type=op_query&method=admin_query_sub_info&topicName=test&consumeGroup=xxx

response:

{
"errCode": 0,
"errMsg": "Ok",
"count": 263,
"data": [{
"consumeGroup": "",
"topicSet": ["a", "b"],
"consumerNum": 33
}]
}

3.2 Query consumer group detailed subscription information

Url http://127.0.0.1:8080/webapi.htm?type=op_query&method=admin_query_consume_group_detail&consumeGroup=test_25

response:

{
"errCode": 0,
"errMsg": "Ok",
"count": 263,
"topicSet": ["a", "b"],
"consumeGroup": "",
"data": [{
"consumerId": "",
"parCount": 1,
"parInfo": [{
"brokerAddr": "",
"topic": "",
"partId": 2
}]
}]
}

4 Broker operation API

4.1 admin_snapshot_message

Check whether it is transferring data under current broker's topic, and what is the content.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
msgCountnothe max number of message to extractint
partitionIdyesthe partition ID which must existsint
filterCondsyesthe streamId value for filteringString

4.2 admin_manual_set_current_offset

Modify the offset value of consuming group under current broker. The new value will be persisted to ZK.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
groupNameyesthe group nameString
modifyUsernothe user who modify the valueString
partitionIdyesthe partition ID which must existsint
manualOffsetyesthe offset to be modified, it must be a valid valuelong

4.3 admin_query_group_offset

Query the offset of consuming group under current broker.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
groupNameyesthe group nameString
partitionIdyesthe partition ID which must existsint
requireRealOffsetnowhether to check real offset on ZK, default falseBoolean

4.4 admin_query_broker_all_consumer_info

Query consumer info of the specific consume group on the broker.

Request

namemustdescriptiontype
groupNameyesthe group nameString

4.5 admin_query_broker_all_store_info

Query store info of the specific topic on the broker.

Request

namemustdescriptiontype
topicNameyesthe topic nameString

4.6 admin_query_broker_memstore_info

Query memory store info of the specific topic on the broker.

Request

namemustdescriptiontype
topicNameyesthe topic nameString
needRefreshnowhether it needs to refresh, default falseBoolean

More API see:

TubeMQ HTTP API
Back to top