use std::collections::HashMap;
use std::collections::HashSet;
use cheetah_string::CheetahString;
use rocketmq_common::common::base::plain_access_config::PlainAccessConfig;
use rocketmq_common::common::config::TopicConfig;
use rocketmq_common::common::message::message_enum::MessageRequestMode;
use rocketmq_common::common::message::message_ext::MessageExt;
use rocketmq_common::common::message::message_queue::MessageQueue;
#[allow(deprecated)]
use rocketmq_common::common::tools::broker_operator_result::BrokerOperatorResult;
#[allow(deprecated)]
use rocketmq_common::common::tools::message_track::MessageTrack;
use rocketmq_remoting::protocol::admin::consume_stats::ConsumeStats;
use rocketmq_remoting::protocol::admin::consume_stats_list::ConsumeStatsList;
use rocketmq_remoting::protocol::admin::rollback_stats::RollbackStats;
use rocketmq_remoting::protocol::admin::topic_stats_table::TopicStatsTable;
use rocketmq_remoting::protocol::body::acl_info::AclInfo;
use rocketmq_remoting::protocol::body::broker_body::broker_member_group::BrokerMemberGroup;
use rocketmq_remoting::protocol::body::broker_body::cluster_info::ClusterInfo;
use rocketmq_remoting::protocol::body::broker_replicas_info::BrokerReplicasInfo;
use rocketmq_remoting::protocol::body::check_rocksdb_cqwrite_progress_response_body::CheckRocksdbCqWriteResult;
use rocketmq_remoting::protocol::body::consume_message_directly_result::ConsumeMessageDirectlyResult;
use rocketmq_remoting::protocol::body::consumer_connection::ConsumerConnection;
use rocketmq_remoting::protocol::body::consumer_running_info::ConsumerRunningInfo;
use rocketmq_remoting::protocol::body::epoch_entry_cache::EpochEntryCache;
use rocketmq_remoting::protocol::body::get_broker_lite_info_response_body::GetBrokerLiteInfoResponseBody;
use rocketmq_remoting::protocol::body::get_lite_client_info_response_body::GetLiteClientInfoResponseBody;
use rocketmq_remoting::protocol::body::get_lite_group_info_response_body::GetLiteGroupInfoResponseBody;
use rocketmq_remoting::protocol::body::get_lite_topic_info_response_body::GetLiteTopicInfoResponseBody;
use rocketmq_remoting::protocol::body::get_parent_topic_info_response_body::GetParentTopicInfoResponseBody;
use rocketmq_remoting::protocol::body::group_list::GroupList;
use rocketmq_remoting::protocol::body::ha_runtime_info::HARuntimeInfo;
use rocketmq_remoting::protocol::body::kv_table::KVTable;
use rocketmq_remoting::protocol::body::producer_connection::ProducerConnection;
use rocketmq_remoting::protocol::body::producer_table_info::ProducerTableInfo;
use rocketmq_remoting::protocol::body::query_consume_queue_response_body::QueryConsumeQueueResponseBody;
use rocketmq_remoting::protocol::body::queue_time_span::QueueTimeSpan;
use rocketmq_remoting::protocol::body::subscription_group_wrapper::SubscriptionGroupWrapper;
use rocketmq_remoting::protocol::body::topic::topic_list::TopicList;
use rocketmq_remoting::protocol::body::topic_info_wrapper::TopicConfigSerializeWrapper;
use rocketmq_remoting::protocol::body::user_info::UserInfo;
use rocketmq_remoting::protocol::header::elect_master_response_header::ElectMasterResponseHeader;
use rocketmq_remoting::protocol::header::get_meta_data_response_header::GetMetaDataResponseHeader;
use rocketmq_remoting::protocol::heartbeat::subscription_data::SubscriptionData;
use rocketmq_remoting::protocol::route::topic_route_data::TopicRouteData;
use rocketmq_remoting::protocol::static_topic::topic_queue_mapping_detail::TopicQueueMappingDetail;
use rocketmq_remoting::protocol::subscription::broker_stats_data::BrokerStatsData;
use rocketmq_remoting::protocol::subscription::group_forbidden::GroupForbidden;
use rocketmq_remoting::protocol::subscription::subscription_group_config::SubscriptionGroupConfig;
use crate::common::admin_tool_result::AdminToolResult;
#[allow(dead_code)]
#[allow(async_fn_in_trait)]
pub trait MQAdminExt: Send {
async fn start(&mut self) -> rocketmq_error::RocketMQResult<()>;
async fn shutdown(&mut self);
async fn add_broker_to_container(
&self,
broker_container_addr: CheetahString,
broker_config: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn remove_broker_from_container(
&self,
broker_container_addr: CheetahString,
cluster_name: CheetahString,
broker_name: CheetahString,
broker_id: u64,
) -> rocketmq_error::RocketMQResult<()>;
async fn update_broker_config(
&self,
broker_addr: CheetahString,
properties: HashMap<CheetahString, CheetahString>,
) -> rocketmq_error::RocketMQResult<()>;
async fn get_broker_config(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<HashMap<CheetahString, CheetahString>>;
async fn create_and_update_topic_config(
&self,
addr: CheetahString,
config: TopicConfig,
) -> rocketmq_error::RocketMQResult<()>;
async fn create_and_update_topic_config_list(
&self,
addr: CheetahString,
topic_config_list: Vec<TopicConfig>,
) -> rocketmq_error::RocketMQResult<()>;
async fn create_and_update_plain_access_config(
&self,
addr: CheetahString,
config: PlainAccessConfig,
) -> rocketmq_error::RocketMQResult<()>;
async fn delete_plain_access_config(
&self,
addr: CheetahString,
access_key: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn update_global_white_addr_config(
&self,
addr: CheetahString,
global_white_addrs: CheetahString,
acl_file_full_path: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<()>;
async fn examine_broker_cluster_acl_version_info(
&self,
addr: CheetahString,
) -> rocketmq_error::RocketMQResult<CheetahString>;
async fn create_and_update_subscription_group_config(
&self,
addr: CheetahString,
config: SubscriptionGroupConfig,
) -> rocketmq_error::RocketMQResult<()>;
async fn create_and_update_subscription_group_config_list(
&self,
broker_addr: CheetahString,
configs: Vec<SubscriptionGroupConfig>,
) -> rocketmq_error::RocketMQResult<()>;
async fn examine_subscription_group_config(
&self,
addr: CheetahString,
group: CheetahString,
) -> rocketmq_error::RocketMQResult<SubscriptionGroupConfig>;
async fn examine_topic_stats(
&self,
topic: CheetahString,
broker_addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<TopicStatsTable>;
async fn examine_topic_stats_concurrent(&self, topic: CheetahString) -> AdminToolResult<TopicStatsTable>;
async fn fetch_all_topic_list(&self) -> rocketmq_error::RocketMQResult<TopicList>;
async fn fetch_topics_by_cluster(&self, cluster_name: CheetahString) -> rocketmq_error::RocketMQResult<TopicList>;
async fn fetch_broker_runtime_stats(&self, broker_addr: CheetahString) -> rocketmq_error::RocketMQResult<KVTable>;
async fn examine_consume_stats(
&self,
consumer_group: CheetahString,
topic: Option<CheetahString>,
cluster_name: Option<CheetahString>,
broker_addr: Option<CheetahString>,
timeout_millis: Option<u64>,
) -> rocketmq_error::RocketMQResult<ConsumeStats>;
async fn check_rocksdb_cq_write_progress(
&self,
broker_addr: CheetahString,
topic: CheetahString,
check_store_time: i64,
) -> rocketmq_error::RocketMQResult<CheckRocksdbCqWriteResult>;
async fn examine_broker_cluster_info(&self) -> rocketmq_error::RocketMQResult<ClusterInfo>;
async fn examine_topic_route_info(
&self,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<Option<TopicRouteData>>;
async fn examine_consumer_connection_info(
&self,
consumer_group: CheetahString,
broker_addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<ConsumerConnection>;
async fn examine_producer_connection_info(
&self,
producer_group: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<ProducerConnection>;
async fn get_all_producer_info(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<ProducerTableInfo>;
async fn get_name_server_address_list(&self) -> Vec<CheetahString>;
async fn wipe_write_perm_of_broker(
&self,
namesrv_addr: CheetahString,
broker_name: CheetahString,
) -> rocketmq_error::RocketMQResult<i32>;
async fn add_write_perm_of_broker(
&self,
namesrv_addr: CheetahString,
broker_name: CheetahString,
) -> rocketmq_error::RocketMQResult<i32>;
async fn put_kv_config(&self, namespace: CheetahString, key: CheetahString, value: CheetahString);
async fn get_kv_config(
&self,
namespace: CheetahString,
key: CheetahString,
) -> rocketmq_error::RocketMQResult<CheetahString>;
async fn get_kv_list_by_namespace(&self, namespace: CheetahString) -> rocketmq_error::RocketMQResult<KVTable>;
async fn delete_topic(
&self,
topic_name: CheetahString,
cluster_name: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn delete_topic_in_broker(
&self,
addrs: HashSet<CheetahString>,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
#[allow(deprecated)]
async fn delete_topic_in_broker_concurrent(
&self,
addrs: HashSet<CheetahString>,
topic: CheetahString,
) -> AdminToolResult<BrokerOperatorResult>;
async fn delete_topic_in_name_server(
&self,
addrs: HashSet<CheetahString>,
cluster_name: Option<CheetahString>,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn delete_subscription_group(
&self,
addr: CheetahString,
group_name: CheetahString,
remove_offset: Option<bool>,
) -> rocketmq_error::RocketMQResult<()>;
async fn create_and_update_kv_config(
&self,
namespace: CheetahString,
key: CheetahString,
value: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn delete_kv_config(
&self,
namespace: CheetahString,
key: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn reset_offset_by_timestamp_old(
&self,
cluster_name: Option<CheetahString>,
consumer_group: CheetahString,
topic: CheetahString,
timestamp: u64,
force: bool,
) -> rocketmq_error::RocketMQResult<Vec<RollbackStats>>;
async fn reset_offset_by_timestamp(
&self,
cluster_name: Option<CheetahString>,
topic: CheetahString,
group: CheetahString,
timestamp: u64,
is_force: bool,
) -> rocketmq_error::RocketMQResult<HashMap<MessageQueue, u64>>;
async fn reset_offset_new(
&self,
consumer_group: CheetahString,
topic: CheetahString,
timestamp: u64,
) -> rocketmq_error::RocketMQResult<()>;
#[allow(deprecated)]
async fn reset_offset_new_concurrent(
&self,
group: CheetahString,
topic: CheetahString,
timestamp: u64,
) -> AdminToolResult<BrokerOperatorResult>;
async fn get_consume_status(
&self,
topic: CheetahString,
group: CheetahString,
client_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<HashMap<CheetahString, HashMap<MessageQueue, u64>>>;
async fn create_or_update_order_conf(
&self,
key: CheetahString,
value: CheetahString,
is_cluster: bool,
) -> rocketmq_error::RocketMQResult<()>;
async fn query_topic_consume_by_who(&self, topic: CheetahString) -> rocketmq_error::RocketMQResult<GroupList>;
async fn query_topics_by_consumer(&self, group: CheetahString) -> rocketmq_error::RocketMQResult<TopicList>;
async fn query_topics_by_consumer_concurrent(&self, group: CheetahString) -> AdminToolResult<TopicList>;
async fn query_subscription(
&self,
group: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<SubscriptionData>;
async fn query_consume_time_span(
&self,
topic: CheetahString,
group: CheetahString,
) -> rocketmq_error::RocketMQResult<Vec<QueueTimeSpan>>;
async fn query_consume_time_span_concurrent(
&self,
topic: CheetahString,
group: CheetahString,
) -> AdminToolResult<Vec<QueueTimeSpan>>;
async fn clean_expired_consumer_queue(
&self,
cluster: Option<CheetahString>,
addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<bool>;
async fn clean_expired_consumer_queue_by_addr(&self, addr: CheetahString) -> rocketmq_error::RocketMQResult<bool>;
async fn delete_expired_commit_log(
&self,
cluster: Option<CheetahString>,
addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<bool>;
async fn delete_expired_commit_log_by_addr(&self, addr: CheetahString) -> rocketmq_error::RocketMQResult<bool>;
async fn clean_unused_topic(
&self,
cluster: Option<CheetahString>,
addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<bool>;
async fn clean_unused_topic_by_addr(&self, addr: CheetahString) -> rocketmq_error::RocketMQResult<bool>;
async fn get_consumer_running_info(
&self,
consumer_group: CheetahString,
client_id: CheetahString,
jstack: bool,
metrics: Option<bool>,
) -> rocketmq_error::RocketMQResult<ConsumerRunningInfo>;
async fn consume_message_directly(
&self,
consumer_group: CheetahString,
client_id: CheetahString,
topic: CheetahString,
msg_id: CheetahString,
) -> rocketmq_error::RocketMQResult<ConsumeMessageDirectlyResult>;
async fn consume_message_directly_ext(
&self,
cluster_name: CheetahString,
consumer_group: CheetahString,
client_id: CheetahString,
topic: CheetahString,
msg_id: CheetahString,
) -> rocketmq_error::RocketMQResult<ConsumeMessageDirectlyResult>;
#[allow(deprecated)]
async fn message_track_detail(&self, msg: MessageExt) -> rocketmq_error::RocketMQResult<Vec<MessageTrack>>;
#[allow(deprecated)]
async fn message_track_detail_concurrent(&self, msg: MessageExt) -> AdminToolResult<Vec<MessageTrack>>;
async fn clone_group_offset(
&self,
src_group: CheetahString,
dest_group: CheetahString,
topic: CheetahString,
is_offline: bool,
) -> rocketmq_error::RocketMQResult<()>;
async fn view_broker_stats_data(
&self,
broker_addr: CheetahString,
stats_name: CheetahString,
stats_key: CheetahString,
) -> rocketmq_error::RocketMQResult<BrokerStatsData>;
async fn get_cluster_list(&self, topic: String) -> rocketmq_error::RocketMQResult<HashSet<CheetahString>>;
async fn fetch_consume_stats_in_broker(
&self,
broker_addr: CheetahString,
is_order: bool,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<ConsumeStatsList>;
async fn get_topic_cluster_list(&self, topic: String) -> rocketmq_error::RocketMQResult<HashSet<CheetahString>>;
async fn get_all_subscription_group(
&self,
broker_addr: CheetahString,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<SubscriptionGroupWrapper>;
async fn get_user_subscription_group(
&self,
broker_addr: CheetahString,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<SubscriptionGroupWrapper>;
async fn get_all_topic_config(
&self,
broker_addr: CheetahString,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<TopicConfigSerializeWrapper>;
async fn get_user_topic_config(
&self,
broker_addr: CheetahString,
special_topic: bool,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<TopicConfigSerializeWrapper>;
async fn update_consume_offset(
&self,
broker_addr: CheetahString,
consume_group: CheetahString,
mq: MessageQueue,
offset: u64,
) -> rocketmq_error::RocketMQResult<()>;
async fn update_name_server_config(
&self,
properties: HashMap<CheetahString, CheetahString>,
name_servers: Option<Vec<CheetahString>>,
) -> rocketmq_error::RocketMQResult<()>;
async fn get_name_server_config(
&self,
name_servers: Vec<CheetahString>,
) -> rocketmq_error::RocketMQResult<HashMap<CheetahString, HashMap<CheetahString, CheetahString>>>;
async fn probe_name_server(&self, name_server: CheetahString) -> rocketmq_error::RocketMQResult<()>;
async fn query_consume_queue(
&self,
broker_addr: CheetahString,
topic: CheetahString,
queue_id: i32,
index: u64,
count: i32,
consumer_group: CheetahString,
) -> rocketmq_error::RocketMQResult<QueryConsumeQueueResponseBody>;
async fn resume_check_half_message(
&self,
topic: CheetahString,
msg_id: CheetahString,
) -> rocketmq_error::RocketMQResult<bool>;
async fn set_message_request_mode(
&self,
broker_addr: CheetahString,
topic: CheetahString,
consumer_group: CheetahString,
mode: MessageRequestMode,
pop_work_group_size: i32,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<()>;
async fn reset_offset_by_queue_id(
&self,
broker_addr: CheetahString,
consumer_group: CheetahString,
topic_name: CheetahString,
queue_id: i32,
reset_offset: u64,
) -> rocketmq_error::RocketMQResult<()>;
async fn examine_topic_config(
&self,
addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicConfig>;
async fn create_static_topic(
&self,
addr: CheetahString,
default_topic: CheetahString,
topic_config: TopicConfig,
mapping_detail: TopicQueueMappingDetail,
force: bool,
) -> rocketmq_error::RocketMQResult<()>;
async fn update_and_get_group_read_forbidden(
&self,
broker_addr: CheetahString,
group_name: CheetahString,
topic_name: CheetahString,
readable: Option<bool>,
) -> rocketmq_error::RocketMQResult<GroupForbidden>;
async fn query_message(
&self,
cluster_name: CheetahString,
topic: CheetahString,
msg_id: CheetahString,
) -> rocketmq_error::RocketMQResult<MessageExt>;
async fn get_broker_ha_status(&self, broker_addr: CheetahString) -> rocketmq_error::RocketMQResult<HARuntimeInfo>;
async fn get_in_sync_state_data(
&self,
controller_address: CheetahString,
brokers: Vec<CheetahString>,
) -> rocketmq_error::RocketMQResult<BrokerReplicasInfo>;
async fn get_broker_epoch_cache(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<EpochEntryCache>;
async fn get_controller_meta_data(
&self,
controller_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<GetMetaDataResponseHeader>;
async fn reset_master_flush_offset(
&self,
broker_addr: CheetahString,
master_flush_offset: u64,
) -> rocketmq_error::RocketMQResult<()>;
async fn get_controller_config(
&self,
controller_servers: Vec<CheetahString>,
) -> rocketmq_error::RocketMQResult<HashMap<CheetahString, HashMap<CheetahString, CheetahString>>>;
async fn update_controller_config(
&self,
properties: HashMap<CheetahString, CheetahString>,
controllers: Vec<CheetahString>,
) -> rocketmq_error::RocketMQResult<()>;
async fn elect_master(
&self,
controller_addr: CheetahString,
cluster_name: CheetahString,
broker_name: CheetahString,
broker_id: Option<u64>,
) -> rocketmq_error::RocketMQResult<(ElectMasterResponseHeader, BrokerMemberGroup)>;
async fn clean_controller_broker_data(
&self,
controller_addr: CheetahString,
cluster_name: CheetahString,
broker_name: CheetahString,
broker_controller_ids_to_clean: Option<CheetahString>,
is_clean_living_broker: bool,
) -> rocketmq_error::RocketMQResult<()>;
async fn update_cold_data_flow_ctr_group_config(
&self,
broker_addr: CheetahString,
properties: HashMap<CheetahString, CheetahString>,
) -> rocketmq_error::RocketMQResult<()>;
async fn remove_cold_data_flow_ctr_group_config(
&self,
broker_addr: CheetahString,
consumer_group: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn get_cold_data_flow_ctr_info(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<CheetahString>;
async fn set_commit_log_read_ahead_mode(
&self,
broker_addr: CheetahString,
mode: CheetahString,
) -> rocketmq_error::RocketMQResult<CheetahString>;
async fn create_user(
&self,
broker_addr: CheetahString,
username: CheetahString,
password: CheetahString,
user_type: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn create_user_with_info(
&self,
broker_addr: CheetahString,
username: CheetahString,
password: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn update_user(
&self,
broker_addr: CheetahString,
username: CheetahString,
password: CheetahString,
user_type: CheetahString,
user_status: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn update_user_with_info(
&self,
broker_addr: CheetahString,
username: CheetahString,
password: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn delete_user(
&self,
broker_addr: CheetahString,
username: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn get_user(
&self,
broker_addr: CheetahString,
username: CheetahString,
) -> rocketmq_error::RocketMQResult<Option<UserInfo>>;
async fn list_users(
&self,
broker_addr: CheetahString,
filter: CheetahString,
) -> rocketmq_error::RocketMQResult<Vec<UserInfo>>;
async fn list_user(
&self,
broker_addr: CheetahString,
filter: CheetahString,
) -> rocketmq_error::RocketMQResult<Vec<UserInfo>> {
self.list_users(broker_addr, filter).await
}
async fn create_acl(
&self,
broker_addr: CheetahString,
subject: CheetahString,
resources: Vec<CheetahString>,
actions: Vec<CheetahString>,
source_ips: Vec<CheetahString>,
decision: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn create_acl_with_info(
&self,
broker_addr: CheetahString,
subject: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn update_acl(
&self,
broker_addr: CheetahString,
subject: CheetahString,
resources: Vec<CheetahString>,
actions: Vec<CheetahString>,
source_ips: Vec<CheetahString>,
decision: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn update_acl_with_info(
&self,
broker_addr: CheetahString,
subject: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn delete_acl(
&self,
broker_addr: CheetahString,
subject: CheetahString,
resource: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn get_acl(
&self,
broker_addr: CheetahString,
subject: CheetahString,
) -> rocketmq_error::RocketMQResult<AclInfo>;
async fn list_acl(
&self,
broker_addr: CheetahString,
subject_filter: CheetahString,
resource_filter: CheetahString,
) -> rocketmq_error::RocketMQResult<Vec<AclInfo>>;
async fn create_lite_pull_topic(
&self,
addr: CheetahString,
topic: CheetahString,
queue_num: i32,
topic_sys_flag: i32,
read_queue_nums: i32,
write_queue_nums: i32,
) -> rocketmq_error::RocketMQResult<()>;
async fn update_lite_pull_topic(
&self,
addr: CheetahString,
topic: CheetahString,
read_queue_nums: i32,
write_queue_nums: i32,
) -> rocketmq_error::RocketMQResult<()>;
async fn get_lite_pull_topic(
&self,
addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicConfig>;
async fn delete_lite_pull_topic(
&self,
addr: CheetahString,
cluster_name: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn query_lite_pull_topic_list(&self, addr: CheetahString) -> rocketmq_error::RocketMQResult<TopicList>;
async fn query_lite_pull_topic_by_cluster(
&self,
cluster_name: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicList>;
async fn query_lite_pull_subscription_list(
&self,
addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<GroupList>;
async fn update_lite_pull_consumer_offset(
&self,
addr: CheetahString,
topic: CheetahString,
group: CheetahString,
queue_id: i32,
offset: u64,
) -> rocketmq_error::RocketMQResult<()>;
async fn examine_consume_stats_with_queue(
&self,
consumer_group: CheetahString,
topic: Option<CheetahString>,
queue_id: Option<i32>,
) -> rocketmq_error::RocketMQResult<ConsumeStats>;
async fn examine_consume_stats_concurrent(
&self,
consumer_group: CheetahString,
topic: Option<CheetahString>,
) -> AdminToolResult<ConsumeStats>;
async fn examine_consume_stats_concurrent_with_cluster(
&self,
consumer_group: CheetahString,
topic: Option<CheetahString>,
cluster_name: Option<CheetahString>,
) -> AdminToolResult<ConsumeStats>;
async fn export_rocksdb_consumer_offset_to_json(
&self,
broker_addr: CheetahString,
file_path: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn export_rocksdb_consumer_offset_from_memory(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<CheetahString>;
async fn sync_broker_member_group(
&self,
controller_addr: CheetahString,
cluster_name: CheetahString,
broker_name: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn get_topic_config_by_topic_name(
&self,
broker_addr: CheetahString,
topic_name: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicConfig>;
async fn notify_min_broker_id_changed(
&self,
cluster_name: CheetahString,
broker_name: CheetahString,
min_broker_id: u64,
min_broker_addr: CheetahString,
offline_broker_addr: Option<CheetahString>,
ha_broker_addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<()>;
async fn get_topic_stats_info(
&self,
broker_addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicStatsTable>;
async fn query_broker_has_topic(
&self,
broker_addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<bool>;
async fn get_system_topic_list_from_broker(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicList>;
async fn examine_topic_route_info_with_timeout(
&self,
topic: CheetahString,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<Option<TopicRouteData>>;
async fn export_pop_records(&self, broker_addr: CheetahString, timeout: u64) -> rocketmq_error::RocketMQResult<()>;
async fn switch_timer_engine(
&self,
broker_addr: CheetahString,
des_timer_engine: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn get_broker_lite_info(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<GetBrokerLiteInfoResponseBody>;
async fn get_parent_topic_info(
&self,
broker_addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<GetParentTopicInfoResponseBody>;
async fn get_lite_topic_info(
&self,
broker_addr: CheetahString,
parent_topic: CheetahString,
lite_topic: CheetahString,
) -> rocketmq_error::RocketMQResult<GetLiteTopicInfoResponseBody>;
async fn get_lite_client_info(
&self,
broker_addr: CheetahString,
parent_topic: CheetahString,
group: CheetahString,
client_id: CheetahString,
) -> rocketmq_error::RocketMQResult<GetLiteClientInfoResponseBody>;
async fn get_lite_group_info(
&self,
broker_addr: CheetahString,
group: CheetahString,
lite_topic: CheetahString,
top_k: i32,
) -> rocketmq_error::RocketMQResult<GetLiteGroupInfoResponseBody>;
async fn trigger_lite_dispatch(
&self,
broker_addr: CheetahString,
group: CheetahString,
client_id: CheetahString,
) -> rocketmq_error::RocketMQResult<()>;
async fn export_rocksdb_config_to_json(
&self,
broker_addr: CheetahString,
config_types: Vec<CheetahString>,
) -> rocketmq_error::RocketMQResult<()>;
async fn search_offset(
&self,
broker_addr: CheetahString,
topic_name: CheetahString,
queue_id: i32,
timestamp: u64,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<u64>;
async fn min_offset(
&self,
broker_addr: CheetahString,
message_queue: MessageQueue,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<i64>;
async fn max_offset(
&self,
broker_addr: CheetahString,
message_queue: MessageQueue,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<i64>;
}
#[allow(deprecated)]
impl MQAdminExt for crate::admin::default_mq_admin_ext::DefaultMQAdminExt {
async fn start(&mut self) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::start(self.inner_mut().as_mut()).await
}
async fn shutdown(&mut self) {
MQAdminExt::shutdown(self.inner_mut().as_mut()).await
}
async fn add_broker_to_container(
&self,
broker_container_addr: CheetahString,
broker_config: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::add_broker_to_container(self.inner().as_ref(), broker_container_addr, broker_config).await
}
async fn remove_broker_from_container(
&self,
broker_container_addr: CheetahString,
cluster_name: CheetahString,
broker_name: CheetahString,
broker_id: u64,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::remove_broker_from_container(
self.inner().as_ref(),
broker_container_addr,
cluster_name,
broker_name,
broker_id,
)
.await
}
async fn update_broker_config(
&self,
broker_addr: CheetahString,
properties: HashMap<CheetahString, CheetahString>,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_broker_config(self.inner().as_ref(), broker_addr, properties).await
}
async fn get_broker_config(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<HashMap<CheetahString, CheetahString>> {
MQAdminExt::get_broker_config(self.inner().as_ref(), broker_addr).await
}
async fn create_and_update_topic_config(
&self,
addr: CheetahString,
config: TopicConfig,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_and_update_topic_config(self.inner().as_ref(), addr, config).await
}
async fn create_and_update_topic_config_list(
&self,
addr: CheetahString,
topic_config_list: Vec<TopicConfig>,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_and_update_topic_config_list(self.inner().as_ref(), addr, topic_config_list).await
}
async fn create_and_update_plain_access_config(
&self,
addr: CheetahString,
config: PlainAccessConfig,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_and_update_plain_access_config(self.inner().as_ref(), addr, config).await
}
async fn delete_plain_access_config(
&self,
addr: CheetahString,
access_key: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::delete_plain_access_config(self.inner().as_ref(), addr, access_key).await
}
async fn update_global_white_addr_config(
&self,
addr: CheetahString,
global_white_addrs: CheetahString,
acl_file_full_path: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_global_white_addr_config(self.inner().as_ref(), addr, global_white_addrs, acl_file_full_path)
.await
}
async fn examine_broker_cluster_acl_version_info(
&self,
addr: CheetahString,
) -> rocketmq_error::RocketMQResult<CheetahString> {
MQAdminExt::examine_broker_cluster_acl_version_info(self.inner().as_ref(), addr).await
}
async fn create_and_update_subscription_group_config(
&self,
addr: CheetahString,
config: SubscriptionGroupConfig,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_and_update_subscription_group_config(self.inner().as_ref(), addr, config).await
}
async fn create_and_update_subscription_group_config_list(
&self,
broker_addr: CheetahString,
configs: Vec<SubscriptionGroupConfig>,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_and_update_subscription_group_config_list(self.inner().as_ref(), broker_addr, configs).await
}
async fn examine_subscription_group_config(
&self,
addr: CheetahString,
group: CheetahString,
) -> rocketmq_error::RocketMQResult<SubscriptionGroupConfig> {
MQAdminExt::examine_subscription_group_config(self.inner().as_ref(), addr, group).await
}
async fn examine_topic_stats(
&self,
topic: CheetahString,
broker_addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<TopicStatsTable> {
MQAdminExt::examine_topic_stats(self.inner().as_ref(), topic, broker_addr).await
}
async fn examine_topic_stats_concurrent(&self, topic: CheetahString) -> AdminToolResult<TopicStatsTable> {
MQAdminExt::examine_topic_stats_concurrent(self.inner().as_ref(), topic).await
}
async fn fetch_all_topic_list(&self) -> rocketmq_error::RocketMQResult<TopicList> {
MQAdminExt::fetch_all_topic_list(self.inner().as_ref()).await
}
async fn fetch_topics_by_cluster(&self, cluster_name: CheetahString) -> rocketmq_error::RocketMQResult<TopicList> {
MQAdminExt::fetch_topics_by_cluster(self.inner().as_ref(), cluster_name).await
}
async fn fetch_broker_runtime_stats(&self, broker_addr: CheetahString) -> rocketmq_error::RocketMQResult<KVTable> {
MQAdminExt::fetch_broker_runtime_stats(self.inner().as_ref(), broker_addr).await
}
async fn examine_consume_stats(
&self,
consumer_group: CheetahString,
topic: Option<CheetahString>,
cluster_name: Option<CheetahString>,
broker_addr: Option<CheetahString>,
timeout_millis: Option<u64>,
) -> rocketmq_error::RocketMQResult<ConsumeStats> {
MQAdminExt::examine_consume_stats(
self.inner().as_ref(),
consumer_group,
topic,
cluster_name,
broker_addr,
timeout_millis,
)
.await
}
async fn check_rocksdb_cq_write_progress(
&self,
broker_addr: CheetahString,
topic: CheetahString,
check_store_time: i64,
) -> rocketmq_error::RocketMQResult<CheckRocksdbCqWriteResult> {
MQAdminExt::check_rocksdb_cq_write_progress(self.inner().as_ref(), broker_addr, topic, check_store_time).await
}
async fn examine_broker_cluster_info(&self) -> rocketmq_error::RocketMQResult<ClusterInfo> {
MQAdminExt::examine_broker_cluster_info(self.inner().as_ref()).await
}
async fn examine_topic_route_info(
&self,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<Option<TopicRouteData>> {
MQAdminExt::examine_topic_route_info(self.inner().as_ref(), topic).await
}
async fn examine_consumer_connection_info(
&self,
consumer_group: CheetahString,
broker_addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<ConsumerConnection> {
MQAdminExt::examine_consumer_connection_info(self.inner().as_ref(), consumer_group, broker_addr).await
}
async fn examine_producer_connection_info(
&self,
producer_group: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<ProducerConnection> {
MQAdminExt::examine_producer_connection_info(self.inner().as_ref(), producer_group, topic).await
}
async fn get_all_producer_info(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<ProducerTableInfo> {
MQAdminExt::get_all_producer_info(self.inner().as_ref(), broker_addr).await
}
async fn get_name_server_address_list(&self) -> Vec<CheetahString> {
MQAdminExt::get_name_server_address_list(self.inner().as_ref()).await
}
async fn wipe_write_perm_of_broker(
&self,
namesrv_addr: CheetahString,
broker_name: CheetahString,
) -> rocketmq_error::RocketMQResult<i32> {
MQAdminExt::wipe_write_perm_of_broker(self.inner().as_ref(), namesrv_addr, broker_name).await
}
async fn add_write_perm_of_broker(
&self,
namesrv_addr: CheetahString,
broker_name: CheetahString,
) -> rocketmq_error::RocketMQResult<i32> {
MQAdminExt::add_write_perm_of_broker(self.inner().as_ref(), namesrv_addr, broker_name).await
}
async fn put_kv_config(&self, namespace: CheetahString, key: CheetahString, value: CheetahString) {
MQAdminExt::put_kv_config(self.inner().as_ref(), namespace, key, value).await
}
async fn get_kv_config(
&self,
namespace: CheetahString,
key: CheetahString,
) -> rocketmq_error::RocketMQResult<CheetahString> {
MQAdminExt::get_kv_config(self.inner().as_ref(), namespace, key).await
}
async fn get_kv_list_by_namespace(&self, namespace: CheetahString) -> rocketmq_error::RocketMQResult<KVTable> {
MQAdminExt::get_kv_list_by_namespace(self.inner().as_ref(), namespace).await
}
async fn delete_topic(
&self,
topic_name: CheetahString,
cluster_name: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::delete_topic(self.inner().as_ref(), topic_name, cluster_name).await
}
async fn delete_topic_in_broker(
&self,
addrs: HashSet<CheetahString>,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::delete_topic_in_broker(self.inner().as_ref(), addrs, topic).await
}
#[allow(deprecated)]
async fn delete_topic_in_broker_concurrent(
&self,
addrs: HashSet<CheetahString>,
topic: CheetahString,
) -> AdminToolResult<BrokerOperatorResult> {
MQAdminExt::delete_topic_in_broker_concurrent(self.inner().as_ref(), addrs, topic).await
}
async fn delete_topic_in_name_server(
&self,
addrs: HashSet<CheetahString>,
cluster_name: Option<CheetahString>,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::delete_topic_in_name_server(self.inner().as_ref(), addrs, cluster_name, topic).await
}
async fn delete_subscription_group(
&self,
addr: CheetahString,
group_name: CheetahString,
remove_offset: Option<bool>,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::delete_subscription_group(self.inner().as_ref(), addr, group_name, remove_offset).await
}
async fn create_and_update_kv_config(
&self,
namespace: CheetahString,
key: CheetahString,
value: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_and_update_kv_config(self.inner().as_ref(), namespace, key, value).await
}
async fn delete_kv_config(
&self,
namespace: CheetahString,
key: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::delete_kv_config(self.inner().as_ref(), namespace, key).await
}
async fn reset_offset_by_timestamp_old(
&self,
cluster_name: Option<CheetahString>,
consumer_group: CheetahString,
topic: CheetahString,
timestamp: u64,
force: bool,
) -> rocketmq_error::RocketMQResult<Vec<RollbackStats>> {
MQAdminExt::reset_offset_by_timestamp_old(
self.inner().as_ref(),
cluster_name,
consumer_group,
topic,
timestamp,
force,
)
.await
}
async fn reset_offset_by_timestamp(
&self,
cluster_name: Option<CheetahString>,
topic: CheetahString,
group: CheetahString,
timestamp: u64,
is_force: bool,
) -> rocketmq_error::RocketMQResult<HashMap<MessageQueue, u64>> {
MQAdminExt::reset_offset_by_timestamp(self.inner().as_ref(), cluster_name, topic, group, timestamp, is_force)
.await
}
async fn reset_offset_new(
&self,
consumer_group: CheetahString,
topic: CheetahString,
timestamp: u64,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::reset_offset_new(self.inner().as_ref(), consumer_group, topic, timestamp).await
}
#[allow(deprecated)]
async fn reset_offset_new_concurrent(
&self,
group: CheetahString,
topic: CheetahString,
timestamp: u64,
) -> AdminToolResult<BrokerOperatorResult> {
MQAdminExt::reset_offset_new_concurrent(self.inner().as_ref(), group, topic, timestamp).await
}
async fn get_consume_status(
&self,
topic: CheetahString,
group: CheetahString,
client_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<HashMap<CheetahString, HashMap<MessageQueue, u64>>> {
MQAdminExt::get_consume_status(self.inner().as_ref(), topic, group, client_addr).await
}
async fn create_or_update_order_conf(
&self,
key: CheetahString,
value: CheetahString,
is_cluster: bool,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_or_update_order_conf(self.inner().as_ref(), key, value, is_cluster).await
}
async fn query_topic_consume_by_who(&self, topic: CheetahString) -> rocketmq_error::RocketMQResult<GroupList> {
MQAdminExt::query_topic_consume_by_who(self.inner().as_ref(), topic).await
}
async fn query_topics_by_consumer(&self, group: CheetahString) -> rocketmq_error::RocketMQResult<TopicList> {
MQAdminExt::query_topics_by_consumer(self.inner().as_ref(), group).await
}
async fn query_topics_by_consumer_concurrent(&self, group: CheetahString) -> AdminToolResult<TopicList> {
MQAdminExt::query_topics_by_consumer_concurrent(self.inner().as_ref(), group).await
}
async fn query_subscription(
&self,
group: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<SubscriptionData> {
MQAdminExt::query_subscription(self.inner().as_ref(), group, topic).await
}
async fn query_consume_time_span(
&self,
topic: CheetahString,
group: CheetahString,
) -> rocketmq_error::RocketMQResult<Vec<QueueTimeSpan>> {
MQAdminExt::query_consume_time_span(self.inner().as_ref(), topic, group).await
}
async fn query_consume_time_span_concurrent(
&self,
topic: CheetahString,
group: CheetahString,
) -> AdminToolResult<Vec<QueueTimeSpan>> {
MQAdminExt::query_consume_time_span_concurrent(self.inner().as_ref(), topic, group).await
}
async fn clean_expired_consumer_queue(
&self,
cluster: Option<CheetahString>,
addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<bool> {
MQAdminExt::clean_expired_consumer_queue(self.inner().as_ref(), cluster, addr).await
}
async fn clean_expired_consumer_queue_by_addr(&self, addr: CheetahString) -> rocketmq_error::RocketMQResult<bool> {
MQAdminExt::clean_expired_consumer_queue_by_addr(self.inner().as_ref(), addr).await
}
async fn delete_expired_commit_log(
&self,
cluster: Option<CheetahString>,
addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<bool> {
MQAdminExt::delete_expired_commit_log(self.inner().as_ref(), cluster, addr).await
}
async fn delete_expired_commit_log_by_addr(&self, addr: CheetahString) -> rocketmq_error::RocketMQResult<bool> {
MQAdminExt::delete_expired_commit_log_by_addr(self.inner().as_ref(), addr).await
}
async fn clean_unused_topic(
&self,
cluster: Option<CheetahString>,
addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<bool> {
MQAdminExt::clean_unused_topic(self.inner().as_ref(), cluster, addr).await
}
async fn clean_unused_topic_by_addr(&self, addr: CheetahString) -> rocketmq_error::RocketMQResult<bool> {
MQAdminExt::clean_unused_topic_by_addr(self.inner().as_ref(), addr).await
}
async fn get_consumer_running_info(
&self,
consumer_group: CheetahString,
client_id: CheetahString,
jstack: bool,
metrics: Option<bool>,
) -> rocketmq_error::RocketMQResult<ConsumerRunningInfo> {
MQAdminExt::get_consumer_running_info(self.inner().as_ref(), consumer_group, client_id, jstack, metrics).await
}
async fn consume_message_directly(
&self,
consumer_group: CheetahString,
client_id: CheetahString,
topic: CheetahString,
msg_id: CheetahString,
) -> rocketmq_error::RocketMQResult<ConsumeMessageDirectlyResult> {
MQAdminExt::consume_message_directly(self.inner().as_ref(), consumer_group, client_id, topic, msg_id).await
}
async fn consume_message_directly_ext(
&self,
cluster_name: CheetahString,
consumer_group: CheetahString,
client_id: CheetahString,
topic: CheetahString,
msg_id: CheetahString,
) -> rocketmq_error::RocketMQResult<ConsumeMessageDirectlyResult> {
MQAdminExt::consume_message_directly_ext(
self.inner().as_ref(),
cluster_name,
consumer_group,
client_id,
topic,
msg_id,
)
.await
}
#[allow(deprecated)]
async fn message_track_detail(&self, msg: MessageExt) -> rocketmq_error::RocketMQResult<Vec<MessageTrack>> {
MQAdminExt::message_track_detail(self.inner().as_ref(), msg).await
}
#[allow(deprecated)]
async fn message_track_detail_concurrent(&self, msg: MessageExt) -> AdminToolResult<Vec<MessageTrack>> {
MQAdminExt::message_track_detail_concurrent(self.inner().as_ref(), msg).await
}
async fn clone_group_offset(
&self,
src_group: CheetahString,
dest_group: CheetahString,
topic: CheetahString,
is_offline: bool,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::clone_group_offset(self.inner().as_ref(), src_group, dest_group, topic, is_offline).await
}
async fn view_broker_stats_data(
&self,
broker_addr: CheetahString,
stats_name: CheetahString,
stats_key: CheetahString,
) -> rocketmq_error::RocketMQResult<BrokerStatsData> {
MQAdminExt::view_broker_stats_data(self.inner().as_ref(), broker_addr, stats_name, stats_key).await
}
async fn get_cluster_list(&self, topic: String) -> rocketmq_error::RocketMQResult<HashSet<CheetahString>> {
MQAdminExt::get_cluster_list(self.inner().as_ref(), topic).await
}
async fn fetch_consume_stats_in_broker(
&self,
broker_addr: CheetahString,
is_order: bool,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<ConsumeStatsList> {
MQAdminExt::fetch_consume_stats_in_broker(self.inner().as_ref(), broker_addr, is_order, timeout_millis).await
}
async fn get_topic_cluster_list(&self, topic: String) -> rocketmq_error::RocketMQResult<HashSet<CheetahString>> {
MQAdminExt::get_topic_cluster_list(self.inner().as_ref(), topic).await
}
async fn get_all_subscription_group(
&self,
broker_addr: CheetahString,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<SubscriptionGroupWrapper> {
MQAdminExt::get_all_subscription_group(self.inner().as_ref(), broker_addr, timeout_millis).await
}
async fn get_user_subscription_group(
&self,
broker_addr: CheetahString,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<SubscriptionGroupWrapper> {
MQAdminExt::get_user_subscription_group(self.inner().as_ref(), broker_addr, timeout_millis).await
}
async fn get_all_topic_config(
&self,
broker_addr: CheetahString,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<TopicConfigSerializeWrapper> {
MQAdminExt::get_all_topic_config(self.inner().as_ref(), broker_addr, timeout_millis).await
}
async fn get_user_topic_config(
&self,
broker_addr: CheetahString,
special_topic: bool,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<TopicConfigSerializeWrapper> {
MQAdminExt::get_user_topic_config(self.inner().as_ref(), broker_addr, special_topic, timeout_millis).await
}
async fn update_consume_offset(
&self,
broker_addr: CheetahString,
consume_group: CheetahString,
mq: MessageQueue,
offset: u64,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_consume_offset(self.inner().as_ref(), broker_addr, consume_group, mq, offset).await
}
async fn update_name_server_config(
&self,
properties: HashMap<CheetahString, CheetahString>,
name_servers: Option<Vec<CheetahString>>,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_name_server_config(self.inner().as_ref(), properties, name_servers).await
}
async fn get_name_server_config(
&self,
name_servers: Vec<CheetahString>,
) -> rocketmq_error::RocketMQResult<HashMap<CheetahString, HashMap<CheetahString, CheetahString>>> {
MQAdminExt::get_name_server_config(self.inner().as_ref(), name_servers).await
}
async fn probe_name_server(&self, name_server: CheetahString) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::probe_name_server(self.inner().as_ref(), name_server).await
}
async fn query_consume_queue(
&self,
broker_addr: CheetahString,
topic: CheetahString,
queue_id: i32,
index: u64,
count: i32,
consumer_group: CheetahString,
) -> rocketmq_error::RocketMQResult<QueryConsumeQueueResponseBody> {
MQAdminExt::query_consume_queue(
self.inner().as_ref(),
broker_addr,
topic,
queue_id,
index,
count,
consumer_group,
)
.await
}
async fn resume_check_half_message(
&self,
topic: CheetahString,
msg_id: CheetahString,
) -> rocketmq_error::RocketMQResult<bool> {
MQAdminExt::resume_check_half_message(self.inner().as_ref(), topic, msg_id).await
}
async fn set_message_request_mode(
&self,
broker_addr: CheetahString,
topic: CheetahString,
consumer_group: CheetahString,
mode: MessageRequestMode,
pop_work_group_size: i32,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::set_message_request_mode(
self.inner().as_ref(),
broker_addr,
topic,
consumer_group,
mode,
pop_work_group_size,
timeout_millis,
)
.await
}
async fn reset_offset_by_queue_id(
&self,
broker_addr: CheetahString,
consumer_group: CheetahString,
topic_name: CheetahString,
queue_id: i32,
reset_offset: u64,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::reset_offset_by_queue_id(
self.inner().as_ref(),
broker_addr,
consumer_group,
topic_name,
queue_id,
reset_offset,
)
.await
}
async fn examine_topic_config(
&self,
addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicConfig> {
MQAdminExt::examine_topic_config(self.inner().as_ref(), addr, topic).await
}
async fn create_static_topic(
&self,
addr: CheetahString,
default_topic: CheetahString,
topic_config: TopicConfig,
mapping_detail: TopicQueueMappingDetail,
force: bool,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_static_topic(
self.inner().as_ref(),
addr,
default_topic,
topic_config,
mapping_detail,
force,
)
.await
}
async fn update_and_get_group_read_forbidden(
&self,
broker_addr: CheetahString,
group_name: CheetahString,
topic_name: CheetahString,
readable: Option<bool>,
) -> rocketmq_error::RocketMQResult<GroupForbidden> {
MQAdminExt::update_and_get_group_read_forbidden(
self.inner().as_ref(),
broker_addr,
group_name,
topic_name,
readable,
)
.await
}
async fn query_message(
&self,
cluster_name: CheetahString,
topic: CheetahString,
msg_id: CheetahString,
) -> rocketmq_error::RocketMQResult<MessageExt> {
MQAdminExt::query_message(self.inner().as_ref(), cluster_name, topic, msg_id).await
}
async fn get_broker_ha_status(&self, broker_addr: CheetahString) -> rocketmq_error::RocketMQResult<HARuntimeInfo> {
MQAdminExt::get_broker_ha_status(self.inner().as_ref(), broker_addr).await
}
async fn get_in_sync_state_data(
&self,
controller_address: CheetahString,
brokers: Vec<CheetahString>,
) -> rocketmq_error::RocketMQResult<BrokerReplicasInfo> {
MQAdminExt::get_in_sync_state_data(self.inner().as_ref(), controller_address, brokers).await
}
async fn get_broker_epoch_cache(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<EpochEntryCache> {
MQAdminExt::get_broker_epoch_cache(self.inner().as_ref(), broker_addr).await
}
async fn get_controller_meta_data(
&self,
controller_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<GetMetaDataResponseHeader> {
MQAdminExt::get_controller_meta_data(self.inner().as_ref(), controller_addr).await
}
async fn reset_master_flush_offset(
&self,
broker_addr: CheetahString,
master_flush_offset: u64,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::reset_master_flush_offset(self.inner().as_ref(), broker_addr, master_flush_offset).await
}
async fn get_controller_config(
&self,
controller_servers: Vec<CheetahString>,
) -> rocketmq_error::RocketMQResult<HashMap<CheetahString, HashMap<CheetahString, CheetahString>>> {
MQAdminExt::get_controller_config(self.inner().as_ref(), controller_servers).await
}
async fn update_controller_config(
&self,
properties: HashMap<CheetahString, CheetahString>,
controllers: Vec<CheetahString>,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_controller_config(self.inner().as_ref(), properties, controllers).await
}
async fn elect_master(
&self,
controller_addr: CheetahString,
cluster_name: CheetahString,
broker_name: CheetahString,
broker_id: Option<u64>,
) -> rocketmq_error::RocketMQResult<(ElectMasterResponseHeader, BrokerMemberGroup)> {
MQAdminExt::elect_master(
self.inner().as_ref(),
controller_addr,
cluster_name,
broker_name,
broker_id,
)
.await
}
async fn clean_controller_broker_data(
&self,
controller_addr: CheetahString,
cluster_name: CheetahString,
broker_name: CheetahString,
broker_controller_ids_to_clean: Option<CheetahString>,
is_clean_living_broker: bool,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::clean_controller_broker_data(
self.inner().as_ref(),
controller_addr,
cluster_name,
broker_name,
broker_controller_ids_to_clean,
is_clean_living_broker,
)
.await
}
async fn update_cold_data_flow_ctr_group_config(
&self,
broker_addr: CheetahString,
properties: HashMap<CheetahString, CheetahString>,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_cold_data_flow_ctr_group_config(self.inner().as_ref(), broker_addr, properties).await
}
async fn remove_cold_data_flow_ctr_group_config(
&self,
broker_addr: CheetahString,
consumer_group: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::remove_cold_data_flow_ctr_group_config(self.inner().as_ref(), broker_addr, consumer_group).await
}
async fn get_cold_data_flow_ctr_info(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<CheetahString> {
MQAdminExt::get_cold_data_flow_ctr_info(self.inner().as_ref(), broker_addr).await
}
async fn set_commit_log_read_ahead_mode(
&self,
broker_addr: CheetahString,
mode: CheetahString,
) -> rocketmq_error::RocketMQResult<CheetahString> {
MQAdminExt::set_commit_log_read_ahead_mode(self.inner().as_ref(), broker_addr, mode).await
}
async fn create_user(
&self,
broker_addr: CheetahString,
username: CheetahString,
password: CheetahString,
user_type: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_user(self.inner().as_ref(), broker_addr, username, password, user_type).await
}
async fn create_user_with_info(
&self,
broker_addr: CheetahString,
username: CheetahString,
password: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_user_with_info(self.inner().as_ref(), broker_addr, username, password).await
}
async fn update_user(
&self,
broker_addr: CheetahString,
username: CheetahString,
password: CheetahString,
user_type: CheetahString,
user_status: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_user(
self.inner().as_ref(),
broker_addr,
username,
password,
user_type,
user_status,
)
.await
}
async fn update_user_with_info(
&self,
broker_addr: CheetahString,
username: CheetahString,
password: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_user_with_info(self.inner().as_ref(), broker_addr, username, password).await
}
async fn delete_user(
&self,
broker_addr: CheetahString,
username: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::delete_user(self.inner().as_ref(), broker_addr, username).await
}
async fn get_user(
&self,
broker_addr: CheetahString,
username: CheetahString,
) -> rocketmq_error::RocketMQResult<Option<UserInfo>> {
MQAdminExt::get_user(self.inner().as_ref(), broker_addr, username).await
}
async fn list_users(
&self,
broker_addr: CheetahString,
filter: CheetahString,
) -> rocketmq_error::RocketMQResult<Vec<UserInfo>> {
MQAdminExt::list_users(self.inner().as_ref(), broker_addr, filter).await
}
async fn create_acl(
&self,
broker_addr: CheetahString,
subject: CheetahString,
resources: Vec<CheetahString>,
actions: Vec<CheetahString>,
source_ips: Vec<CheetahString>,
decision: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_acl(
self.inner().as_ref(),
broker_addr,
subject,
resources,
actions,
source_ips,
decision,
)
.await
}
async fn create_acl_with_info(
&self,
broker_addr: CheetahString,
subject: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_acl_with_info(self.inner().as_ref(), broker_addr, subject).await
}
async fn update_acl(
&self,
broker_addr: CheetahString,
subject: CheetahString,
resources: Vec<CheetahString>,
actions: Vec<CheetahString>,
source_ips: Vec<CheetahString>,
decision: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_acl(
self.inner().as_ref(),
broker_addr,
subject,
resources,
actions,
source_ips,
decision,
)
.await
}
async fn update_acl_with_info(
&self,
broker_addr: CheetahString,
subject: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_acl_with_info(self.inner().as_ref(), broker_addr, subject).await
}
async fn delete_acl(
&self,
broker_addr: CheetahString,
subject: CheetahString,
resource: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::delete_acl(self.inner().as_ref(), broker_addr, subject, resource).await
}
async fn get_acl(
&self,
broker_addr: CheetahString,
subject: CheetahString,
) -> rocketmq_error::RocketMQResult<AclInfo> {
MQAdminExt::get_acl(self.inner().as_ref(), broker_addr, subject).await
}
async fn list_acl(
&self,
broker_addr: CheetahString,
subject_filter: CheetahString,
resource_filter: CheetahString,
) -> rocketmq_error::RocketMQResult<Vec<AclInfo>> {
MQAdminExt::list_acl(self.inner().as_ref(), broker_addr, subject_filter, resource_filter).await
}
async fn create_lite_pull_topic(
&self,
addr: CheetahString,
topic: CheetahString,
queue_num: i32,
topic_sys_flag: i32,
read_queue_nums: i32,
write_queue_nums: i32,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::create_lite_pull_topic(
self.inner().as_ref(),
addr,
topic,
queue_num,
topic_sys_flag,
read_queue_nums,
write_queue_nums,
)
.await
}
async fn update_lite_pull_topic(
&self,
addr: CheetahString,
topic: CheetahString,
read_queue_nums: i32,
write_queue_nums: i32,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_lite_pull_topic(self.inner().as_ref(), addr, topic, read_queue_nums, write_queue_nums).await
}
async fn get_lite_pull_topic(
&self,
addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicConfig> {
MQAdminExt::get_lite_pull_topic(self.inner().as_ref(), addr, topic).await
}
async fn delete_lite_pull_topic(
&self,
addr: CheetahString,
cluster_name: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::delete_lite_pull_topic(self.inner().as_ref(), addr, cluster_name, topic).await
}
async fn query_lite_pull_topic_list(&self, addr: CheetahString) -> rocketmq_error::RocketMQResult<TopicList> {
MQAdminExt::query_lite_pull_topic_list(self.inner().as_ref(), addr).await
}
async fn query_lite_pull_topic_by_cluster(
&self,
cluster_name: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicList> {
MQAdminExt::query_lite_pull_topic_by_cluster(self.inner().as_ref(), cluster_name).await
}
async fn query_lite_pull_subscription_list(
&self,
addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<GroupList> {
MQAdminExt::query_lite_pull_subscription_list(self.inner().as_ref(), addr, topic).await
}
async fn update_lite_pull_consumer_offset(
&self,
addr: CheetahString,
topic: CheetahString,
group: CheetahString,
queue_id: i32,
offset: u64,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::update_lite_pull_consumer_offset(self.inner().as_ref(), addr, topic, group, queue_id, offset).await
}
async fn examine_consume_stats_with_queue(
&self,
consumer_group: CheetahString,
topic: Option<CheetahString>,
queue_id: Option<i32>,
) -> rocketmq_error::RocketMQResult<ConsumeStats> {
MQAdminExt::examine_consume_stats_with_queue(self.inner().as_ref(), consumer_group, topic, queue_id).await
}
async fn examine_consume_stats_concurrent(
&self,
consumer_group: CheetahString,
topic: Option<CheetahString>,
) -> AdminToolResult<ConsumeStats> {
MQAdminExt::examine_consume_stats_concurrent(self.inner().as_ref(), consumer_group, topic).await
}
async fn examine_consume_stats_concurrent_with_cluster(
&self,
consumer_group: CheetahString,
topic: Option<CheetahString>,
cluster_name: Option<CheetahString>,
) -> AdminToolResult<ConsumeStats> {
MQAdminExt::examine_consume_stats_concurrent_with_cluster(
self.inner().as_ref(),
consumer_group,
topic,
cluster_name,
)
.await
}
async fn export_rocksdb_consumer_offset_to_json(
&self,
broker_addr: CheetahString,
file_path: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::export_rocksdb_consumer_offset_to_json(self.inner().as_ref(), broker_addr, file_path).await
}
async fn export_rocksdb_consumer_offset_from_memory(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<CheetahString> {
MQAdminExt::export_rocksdb_consumer_offset_from_memory(self.inner().as_ref(), broker_addr).await
}
async fn sync_broker_member_group(
&self,
controller_addr: CheetahString,
cluster_name: CheetahString,
broker_name: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::sync_broker_member_group(self.inner().as_ref(), controller_addr, cluster_name, broker_name).await
}
async fn get_topic_config_by_topic_name(
&self,
broker_addr: CheetahString,
topic_name: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicConfig> {
MQAdminExt::get_topic_config_by_topic_name(self.inner().as_ref(), broker_addr, topic_name).await
}
async fn notify_min_broker_id_changed(
&self,
cluster_name: CheetahString,
broker_name: CheetahString,
min_broker_id: u64,
min_broker_addr: CheetahString,
offline_broker_addr: Option<CheetahString>,
ha_broker_addr: Option<CheetahString>,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::notify_min_broker_id_changed(
self.inner().as_ref(),
cluster_name,
broker_name,
min_broker_id,
min_broker_addr,
offline_broker_addr,
ha_broker_addr,
)
.await
}
async fn get_topic_stats_info(
&self,
broker_addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicStatsTable> {
MQAdminExt::get_topic_stats_info(self.inner().as_ref(), broker_addr, topic).await
}
async fn query_broker_has_topic(
&self,
broker_addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<bool> {
MQAdminExt::query_broker_has_topic(self.inner().as_ref(), broker_addr, topic).await
}
async fn get_system_topic_list_from_broker(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<TopicList> {
MQAdminExt::get_system_topic_list_from_broker(self.inner().as_ref(), broker_addr).await
}
async fn examine_topic_route_info_with_timeout(
&self,
topic: CheetahString,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<Option<TopicRouteData>> {
MQAdminExt::examine_topic_route_info_with_timeout(self.inner().as_ref(), topic, timeout_millis).await
}
async fn export_pop_records(&self, broker_addr: CheetahString, timeout: u64) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::export_pop_records(self.inner().as_ref(), broker_addr, timeout).await
}
async fn switch_timer_engine(
&self,
broker_addr: CheetahString,
des_timer_engine: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::switch_timer_engine(self.inner().as_ref(), broker_addr, des_timer_engine).await
}
async fn get_broker_lite_info(
&self,
broker_addr: CheetahString,
) -> rocketmq_error::RocketMQResult<GetBrokerLiteInfoResponseBody> {
MQAdminExt::get_broker_lite_info(self.inner().as_ref(), broker_addr).await
}
async fn get_parent_topic_info(
&self,
broker_addr: CheetahString,
topic: CheetahString,
) -> rocketmq_error::RocketMQResult<GetParentTopicInfoResponseBody> {
MQAdminExt::get_parent_topic_info(self.inner().as_ref(), broker_addr, topic).await
}
async fn get_lite_topic_info(
&self,
broker_addr: CheetahString,
parent_topic: CheetahString,
lite_topic: CheetahString,
) -> rocketmq_error::RocketMQResult<GetLiteTopicInfoResponseBody> {
MQAdminExt::get_lite_topic_info(self.inner().as_ref(), broker_addr, parent_topic, lite_topic).await
}
async fn get_lite_client_info(
&self,
broker_addr: CheetahString,
parent_topic: CheetahString,
group: CheetahString,
client_id: CheetahString,
) -> rocketmq_error::RocketMQResult<GetLiteClientInfoResponseBody> {
MQAdminExt::get_lite_client_info(self.inner().as_ref(), broker_addr, parent_topic, group, client_id).await
}
async fn get_lite_group_info(
&self,
broker_addr: CheetahString,
group: CheetahString,
lite_topic: CheetahString,
top_k: i32,
) -> rocketmq_error::RocketMQResult<GetLiteGroupInfoResponseBody> {
MQAdminExt::get_lite_group_info(self.inner().as_ref(), broker_addr, group, lite_topic, top_k).await
}
async fn trigger_lite_dispatch(
&self,
broker_addr: CheetahString,
group: CheetahString,
client_id: CheetahString,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::trigger_lite_dispatch(self.inner().as_ref(), broker_addr, group, client_id).await
}
async fn export_rocksdb_config_to_json(
&self,
broker_addr: CheetahString,
config_types: Vec<CheetahString>,
) -> rocketmq_error::RocketMQResult<()> {
MQAdminExt::export_rocksdb_config_to_json(self.inner().as_ref(), broker_addr, config_types).await
}
async fn search_offset(
&self,
broker_addr: CheetahString,
topic_name: CheetahString,
queue_id: i32,
timestamp: u64,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<u64> {
MQAdminExt::search_offset(
self.inner().as_ref(),
broker_addr,
topic_name,
queue_id,
timestamp,
timeout_millis,
)
.await
}
async fn min_offset(
&self,
broker_addr: CheetahString,
message_queue: MessageQueue,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<i64> {
MQAdminExt::min_offset(self.inner().as_ref(), broker_addr, message_queue, timeout_millis).await
}
async fn max_offset(
&self,
broker_addr: CheetahString,
message_queue: MessageQueue,
timeout_millis: u64,
) -> rocketmq_error::RocketMQResult<i64> {
MQAdminExt::max_offset(self.inner().as_ref(), broker_addr, message_queue, timeout_millis).await
}
}