Trait MqClientAdmin

Source
pub trait MqClientAdmin: Sync + Send {
Show 19 methods // Required methods fn query_message( &self, address: &str, unique_key_flag: bool, decompress_body: bool, request_header: QueryMessageRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<Vec<MessageExt>>> + Send; fn get_topic_stats_info( &self, address: &str, request_header: GetTopicStatsInfoRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<TopicStatsTable>> + Send; fn query_consume_time_span( &self, address: &str, request_header: QueryConsumeTimeSpanRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<Vec<QueueTimeSpan>>> + Send; fn update_or_create_topic( &self, address: &str, request_header: CreateTopicRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send; fn update_or_create_subscription_group( &self, address: &str, config: SubscriptionGroupConfig, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send; fn delete_topic_in_broker( &self, address: &str, request_header: DeleteTopicRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send; fn delete_topic_in_nameserver( &self, address: &str, request_header: DeleteTopicFromNamesrvRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send; fn delete_kv_config( &self, address: &str, request_header: DeleteKVConfigRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send; fn delete_subscription_group( &self, address: &str, request_header: DeleteSubscriptionGroupRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send; fn invoke_broker_to_reset_offset( &self, address: &str, request_header: ResetOffsetRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<HashMap<MessageQueue, i64>>> + Send; fn view_message( &self, address: &str, request_header: ViewMessageRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<MessageExt>> + Send; fn get_broker_cluster_info( &self, address: &str, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<ClusterInfo>> + Send; fn get_consumer_connection_list( &self, address: &str, request_header: GetConsumerConnectionListRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<ConsumerConnection>> + Send; fn query_topics_by_consumer( &self, address: &str, request_header: QueryTopicsByConsumerRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<TopicList>> + Send; fn query_subscription_by_consumer( &self, address: &str, request_header: QuerySubscriptionByConsumerRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<SubscriptionData>> + Send; fn get_consume_stats( &self, address: &str, request_header: GetConsumeStatsRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<ConsumeStats>> + Send; fn query_topic_consume_by_who( &self, address: &str, request_header: QueryTopicConsumeByWhoRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<GroupList>> + Send; fn get_consumer_running_info( &self, address: &str, request_header: GetConsumerRunningInfoRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<ConsumerRunningInfo>> + Send; fn consume_message_directly( &self, address: &str, request_header: ConsumeMessageDirectlyResultRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<ConsumeMessageDirectlyResult>> + Send;
}

Required Methods§

Source

fn query_message( &self, address: &str, unique_key_flag: bool, decompress_body: bool, request_header: QueryMessageRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<Vec<MessageExt>>> + Send

Queries messages based on the provided request header.

§Arguments
  • address - The address of the broker.
  • unique_key_flag - Flag indicating if the unique key should be used.
  • decompress_body - Flag indicating if the message body should be decompressed.
  • request_header - The request header containing query parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing a vector of MessageExt or an error.

Source

fn get_topic_stats_info( &self, address: &str, request_header: GetTopicStatsInfoRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<TopicStatsTable>> + Send

Retrieves topic statistics information.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing query parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing TopicStatsTable or an error.

Source

fn query_consume_time_span( &self, address: &str, request_header: QueryConsumeTimeSpanRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<Vec<QueueTimeSpan>>> + Send

Queries the consume time span for a topic.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing query parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing a vector of QueueTimeSpan or an error.

Source

fn update_or_create_topic( &self, address: &str, request_header: CreateTopicRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send

Updates or creates a topic.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing topic parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result indicating success or failure.

Source

fn update_or_create_subscription_group( &self, address: &str, config: SubscriptionGroupConfig, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send

Updates or creates a subscription group.

§Arguments
  • address - The address of the broker.
  • config - The configuration for the subscription group.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result indicating success or failure.

Source

fn delete_topic_in_broker( &self, address: &str, request_header: DeleteTopicRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send

Deletes a topic in the broker.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing topic parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result indicating success or failure.

Source

fn delete_topic_in_nameserver( &self, address: &str, request_header: DeleteTopicFromNamesrvRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send

Deletes a topic in the nameserver.

§Arguments
  • address - The address of the nameserver.
  • request_header - The request header containing topic parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result indicating success or failure.

Source

fn delete_kv_config( &self, address: &str, request_header: DeleteKVConfigRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send

Deletes a key-value configuration.

§Arguments
  • address - The address of the nameserver.
  • request_header - The request header containing key-value parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result indicating success or failure.

Source

fn delete_subscription_group( &self, address: &str, request_header: DeleteSubscriptionGroupRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<()>> + Send

Deletes a subscription group.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing subscription group parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result indicating success or failure.

Source

fn invoke_broker_to_reset_offset( &self, address: &str, request_header: ResetOffsetRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<HashMap<MessageQueue, i64>>> + Send

Invokes the broker to reset the offset.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing reset offset parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing a hashmap of MessageQueue to offset or an error.

Source

fn view_message( &self, address: &str, request_header: ViewMessageRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<MessageExt>> + Send

Views a message.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing view message parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing MessageExt or an error.

Source

fn get_broker_cluster_info( &self, address: &str, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<ClusterInfo>> + Send

Retrieves broker cluster information.

§Arguments
  • address - The address of the broker.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing ClusterInfo or an error.

Source

fn get_consumer_connection_list( &self, address: &str, request_header: GetConsumerConnectionListRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<ConsumerConnection>> + Send

Retrieves the consumer connection list.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing consumer connection parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing ConsumerConnection or an error.

Source

fn query_topics_by_consumer( &self, address: &str, request_header: QueryTopicsByConsumerRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<TopicList>> + Send

Queries topics by consumer.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing query parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing TopicList or an error.

Source

fn query_subscription_by_consumer( &self, address: &str, request_header: QuerySubscriptionByConsumerRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<SubscriptionData>> + Send

Queries subscription by consumer.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing query parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing SubscriptionData or an error.

Source

fn get_consume_stats( &self, address: &str, request_header: GetConsumeStatsRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<ConsumeStats>> + Send

Retrieves consume statistics.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing query parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing ConsumeStats or an error.

Source

fn query_topic_consume_by_who( &self, address: &str, request_header: QueryTopicConsumeByWhoRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<GroupList>> + Send

Queries which group consumes a topic.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing query parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing GroupList or an error.

Source

fn get_consumer_running_info( &self, address: &str, request_header: GetConsumerRunningInfoRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<ConsumerRunningInfo>> + Send

Retrieves consumer running information.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing query parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing ConsumerRunningInfo or an error.

Source

fn consume_message_directly( &self, address: &str, request_header: ConsumeMessageDirectlyResultRequestHeader, timeout_millis: u64, ) -> impl Future<Output = RocketMQResult<ConsumeMessageDirectlyResult>> + Send

Consumes a message directly.

§Arguments
  • address - The address of the broker.
  • request_header - The request header containing consume message parameters.
  • timeout_millis - The timeout in milliseconds for the operation.
§Returns

A result containing ConsumeMessageDirectlyResult or an error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§