Skip to main content

MQAdminMutationExt

Trait MQAdminMutationExt 

Source
pub trait MQAdminMutationExt: Send {
Show 44 methods // Required methods async fn begin_proxy_drain( &self, proxy_addr: CheetahString, operation_id: CheetahString, ) -> ClientResult<ProxyDrainStateResponseBody>; async fn cancel_proxy_drain( &self, proxy_addr: CheetahString, operation_id: CheetahString, ) -> ClientResult<ProxyDrainStateResponseBody>; async fn broker_config_generation( &self, broker_addr: CheetahString, ) -> ClientResult<u64>; async fn patch_broker_config_if_generation( &self, broker_addr: CheetahString, expected_generation: u64, properties: HashMap<CheetahString, CheetahString>, ) -> ClientResult<BrokerConfigPatchOutcome>; async fn patch_topic_config_if_version( &self, broker_addr: CheetahString, topic: CheetahString, expected_version: u64, patch: TopicConfigPatch, ) -> ClientResult<TopicConfigPatchOutcome>; async fn patch_subscription_group_config_if_version( &self, broker_addr: CheetahString, group: CheetahString, expected_version: u64, patch: SubscriptionGroupConfigPatch, ) -> ClientResult<SubscriptionGroupConfigPatchOutcome>; async fn upsert_topic_config( &self, broker_addr: CheetahString, config: TopicConfig, ) -> ClientResult<()>; async fn remove_topic( &self, topic_name: CheetahString, cluster_name: CheetahString, ) -> ClientResult<()>; async fn reset_consumer_offset( &self, cluster_name: Option<CheetahString>, topic: CheetahString, consumer_group: CheetahString, timestamp: u64, force: bool, ) -> ClientResult<HashMap<MessageQueue, u64>>; async fn upsert_subscription_group( &self, broker_addr: CheetahString, config: SubscriptionGroupConfig, ) -> ClientResult<()>; async fn remove_subscription_group( &self, broker_addr: CheetahString, group_name: CheetahString, remove_offset: Option<bool>, ) -> ClientResult<()>; async fn remove_subscription_groups( &self, broker_addr: CheetahString, group_names: Vec<CheetahString>, clean_offset: bool, ) -> ClientResult<()>; async fn configure_message_request_mode( &self, broker_addr: CheetahString, topic: CheetahString, consumer_group: CheetahString, mode: MessageRequestMode, pop_work_group_size: i32, timeout_millis: u64, ) -> ClientResult<()>; async fn consume_directly( &self, consumer_group: CheetahString, client_id: CheetahString, topic: CheetahString, message_id: CheetahString, ) -> ClientResult<ConsumeMessageDirectlyResult>; async fn clone_consumer_group_offset( &self, source_group: CheetahString, destination_group: CheetahString, topic: CheetahString, offline: bool, ) -> ClientResult<()>; async fn mutation_cluster_info(&self) -> ClientResult<ClusterInfo>; async fn mutation_topic_route( &self, topic: CheetahString, ) -> ClientResult<Option<TopicRouteData>>; async fn mutation_topic_config( &self, broker_addr: CheetahString, topic: CheetahString, ) -> ClientResult<TopicConfig>; async fn remove_topic_from_brokers( &self, broker_addrs: HashSet<CheetahString>, topic: CheetahString, ) -> ClientResult<()>; async fn remove_topics_from_broker( &self, broker_addr: CheetahString, topics: Vec<CheetahString>, ) -> ClientResult<()>; async fn remove_topic_from_name_servers( &self, namesrv_addrs: HashSet<CheetahString>, cluster_name: Option<CheetahString>, topic: CheetahString, ) -> ClientResult<()>; async fn mutation_name_server_addresses( &self, ) -> ClientResult<Vec<CheetahString>>; async fn upsert_order_topic_config( &self, topic: CheetahString, value: CheetahString, cluster_wide: bool, ) -> ClientResult<()>; async fn reset_consumer_offset_legacy( &self, cluster_name: Option<CheetahString>, consumer_group: CheetahString, topic: CheetahString, timestamp: u64, force: bool, ) -> ClientResult<Vec<RollbackStats>>; async fn view_message_for_mutation( &self, topic: CheetahString, message_id: CheetahString, ) -> ClientResult<MessageExt>; // Provided methods async fn mutation_topic_config_with_version( &self, broker_addr: CheetahString, topic: CheetahString, ) -> ClientResult<MutationTopicConfigVersioned> { ... } async fn mutation_topic_config_state( &self, broker_addr: CheetahString, topic: CheetahString, ) -> ClientResult<MutationTopicConfigState> { ... } async fn replace_topic_config_if_state( &self, broker_addr: CheetahString, topic: CheetahString, expected_state: MutationExpectedState, replacement: MutationTopicConfig, ) -> ClientResult<MutationStateCasOutcome> { ... } async fn mutation_subscription_group_config_state( &self, broker_addr: CheetahString, group: CheetahString, ) -> ClientResult<MutationSubscriptionGroupConfigState> { ... } async fn replace_subscription_group_config_if_state( &self, broker_addr: CheetahString, group: CheetahString, expected_state: MutationExpectedState, replacement: MutationSubscriptionGroupConfig, ) -> ClientResult<MutationStateCasOutcome> { ... } async fn broker_mutation_config_state( &self, broker_addr: CheetahString, ) -> ClientResult<BrokerMutationConfigState> { ... } async fn reset_consumer_offset_if_current( &self, broker_addr: CheetahString, consumer_group: CheetahString, topic: CheetahString, queue_id: i32, expected_offset: i64, new_offset: i64, ) -> ClientResult<ConditionalConsumerOffsetOutcome> { ... } async fn preview_consumer_offset_reset_on_broker( &self, broker_addr: CheetahString, broker_name: CheetahString, read_queue_nums: u32, consumer_group: CheetahString, topic: CheetahString, timestamp: i64, ) -> ClientResult<Vec<MutationConsumerOffsetPreview>> { ... } async fn mutation_consumer_offset( &self, broker_addr: CheetahString, consumer_group: CheetahString, topic: CheetahString, queue_id: i32, ) -> ClientResult<i64> { ... } async fn mutation_message_request_mode( &self, broker_addr: CheetahString, topic: CheetahString, consumer_group: CheetahString, ) -> ClientResult<Option<MutationMessageRequestMode>> { ... } async fn replace_message_request_mode_if_current( &self, broker_addr: CheetahString, topic: CheetahString, consumer_group: CheetahString, expected: MutationExpectedMessageRequestMode, replacement: MutationMessageRequestMode, ) -> ClientResult<MutationMessageRequestModeOutcome> { ... } async fn replace_message_request_mode_if_current_with_timeout( &self, broker_addr: CheetahString, topic: CheetahString, consumer_group: CheetahString, expected: MutationExpectedMessageRequestMode, replacement: MutationMessageRequestMode, timeout_millis: u64, ) -> ClientResult<MutationMessageRequestModeOutcome> { ... } async fn set_broker_log_filter_ttl( &self, broker_addr: CheetahString, logger: CheetahString, level: CheetahString, ttl_seconds: u32, operation_id: CheetahString, ) -> ClientResult<()> { ... } async fn restore_broker_log_filter( &self, broker_addr: CheetahString, operation_id: CheetahString, ) -> ClientResult<()> { ... } async fn reset_consumer_offset_detailed( &self, cluster_name: CheetahString, topic: CheetahString, consumer_group: CheetahString, timestamp: u64, force: bool, ) -> ClientResult<TopicOffsetMutationOutcome> { ... } async fn skip_accumulated_message( &self, cluster_name: Option<CheetahString>, topic: CheetahString, consumer_group: CheetahString, force: bool, ) -> ClientResult<usize> { ... } async fn skip_accumulated_message_detailed( &self, cluster_name: CheetahString, topic: CheetahString, consumer_group: CheetahString, force: bool, ) -> ClientResult<TopicOffsetMutationOutcome> { ... } async fn mutation_order_topic_config( &self, topic: CheetahString, ) -> ClientResult<Option<CheetahString>> { ... } async fn delete_order_topic_config( &self, topic: CheetahString, ) -> ClientResult<()> { ... }
}
Expand description

Explicit RocketMQ mutation capability.

New integrations should request this trait deliberately and keep it out of read-only process dependency graphs.

Required Methods§

Source

async fn begin_proxy_drain( &self, proxy_addr: CheetahString, operation_id: CheetahString, ) -> ClientResult<ProxyDrainStateResponseBody>

Begins one authenticated, reversible drain operation for a Proxy.

Source

async fn cancel_proxy_drain( &self, proxy_addr: CheetahString, operation_id: CheetahString, ) -> ClientResult<ProxyDrainStateResponseBody>

Cancels a timed-out drain and restores Proxy admission/readiness.

Source

async fn broker_config_generation( &self, broker_addr: CheetahString, ) -> ClientResult<u64>

Reads the broker configuration generation used by supervised prechecks.

Source

async fn patch_broker_config_if_generation( &self, broker_addr: CheetahString, expected_generation: u64, properties: HashMap<CheetahString, CheetahString>, ) -> ClientResult<BrokerConfigPatchOutcome>

Applies a broker configuration patch only when expected_generation still matches the broker’s current generation.

Source

async fn patch_topic_config_if_version( &self, broker_addr: CheetahString, topic: CheetahString, expected_version: u64, patch: TopicConfigPatch, ) -> ClientResult<TopicConfigPatchOutcome>

Changes only the three fields in TopicConfigPatch when the Broker’s current Topic metadata version still matches expected_version.

Source

async fn patch_subscription_group_config_if_version( &self, broker_addr: CheetahString, group: CheetahString, expected_version: u64, patch: SubscriptionGroupConfigPatch, ) -> ClientResult<SubscriptionGroupConfigPatchOutcome>

Changes only the three fields in SubscriptionGroupConfigPatch when the Broker’s current Subscription Group metadata version still matches expected_version.

Source

async fn upsert_topic_config( &self, broker_addr: CheetahString, config: TopicConfig, ) -> ClientResult<()>

Source

async fn remove_topic( &self, topic_name: CheetahString, cluster_name: CheetahString, ) -> ClientResult<()>

Source

async fn reset_consumer_offset( &self, cluster_name: Option<CheetahString>, topic: CheetahString, consumer_group: CheetahString, timestamp: u64, force: bool, ) -> ClientResult<HashMap<MessageQueue, u64>>

Source

async fn upsert_subscription_group( &self, broker_addr: CheetahString, config: SubscriptionGroupConfig, ) -> ClientResult<()>

Source

async fn remove_subscription_group( &self, broker_addr: CheetahString, group_name: CheetahString, remove_offset: Option<bool>, ) -> ClientResult<()>

Source

async fn remove_subscription_groups( &self, broker_addr: CheetahString, group_names: Vec<CheetahString>, clean_offset: bool, ) -> ClientResult<()>

Removes multiple subscription groups from one broker in a single request.

Source

async fn configure_message_request_mode( &self, broker_addr: CheetahString, topic: CheetahString, consumer_group: CheetahString, mode: MessageRequestMode, pop_work_group_size: i32, timeout_millis: u64, ) -> ClientResult<()>

Source

async fn consume_directly( &self, consumer_group: CheetahString, client_id: CheetahString, topic: CheetahString, message_id: CheetahString, ) -> ClientResult<ConsumeMessageDirectlyResult>

Source

async fn clone_consumer_group_offset( &self, source_group: CheetahString, destination_group: CheetahString, topic: CheetahString, offline: bool, ) -> ClientResult<()>

Source

async fn mutation_cluster_info(&self) -> ClientResult<ClusterInfo>

Returns the cluster topology needed to resolve mutation targets.

Source

async fn mutation_topic_route( &self, topic: CheetahString, ) -> ClientResult<Option<TopicRouteData>>

Returns route data used to scope a mutation to the topic’s brokers.

Source

async fn mutation_topic_config( &self, broker_addr: CheetahString, topic: CheetahString, ) -> ClientResult<TopicConfig>

Reads a broker’s current topic configuration before a bounded test send.

Source

async fn remove_topic_from_brokers( &self, broker_addrs: HashSet<CheetahString>, topic: CheetahString, ) -> ClientResult<()>

Removes a topic from an explicitly resolved broker set.

Source

async fn remove_topics_from_broker( &self, broker_addr: CheetahString, topics: Vec<CheetahString>, ) -> ClientResult<()>

Removes multiple topics from one broker in a single request.

Source

async fn remove_topic_from_name_servers( &self, namesrv_addrs: HashSet<CheetahString>, cluster_name: Option<CheetahString>, topic: CheetahString, ) -> ClientResult<()>

Removes a topic from an explicitly resolved NameServer set.

Source

async fn mutation_name_server_addresses( &self, ) -> ClientResult<Vec<CheetahString>>

Returns the NameServer targets owned by this started admin session.

Source

async fn upsert_order_topic_config( &self, topic: CheetahString, value: CheetahString, cluster_wide: bool, ) -> ClientResult<()>

Updates the order-topic configuration associated with a topic mutation.

Source

async fn reset_consumer_offset_legacy( &self, cluster_name: Option<CheetahString>, consumer_group: CheetahString, topic: CheetahString, timestamp: u64, force: bool, ) -> ClientResult<Vec<RollbackStats>>

Performs the broker-by-broker offset reset fallback used for offline consumers.

Source

async fn view_message_for_mutation( &self, topic: CheetahString, message_id: CheetahString, ) -> ClientResult<MessageExt>

Views the message metadata required to validate a DLQ resend.

Provided Methods§

Source

async fn mutation_topic_config_with_version( &self, broker_addr: CheetahString, topic: CheetahString, ) -> ClientResult<MutationTopicConfigVersioned>

Reads only the Topic fields and version needed to prepare a supervised queue-count compare-and-set mutation.

Source

async fn mutation_topic_config_state( &self, broker_addr: CheetahString, topic: CheetahString, ) -> ClientResult<MutationTopicConfigState>

Reads a presence-aware, allowlisted Topic state from one exact Broker.

Source

async fn replace_topic_config_if_state( &self, broker_addr: CheetahString, topic: CheetahString, expected_state: MutationExpectedState, replacement: MutationTopicConfig, ) -> ClientResult<MutationStateCasOutcome>

Creates or fully replaces the allowlisted Topic state only when its presence/version precondition still matches.

Source

async fn mutation_subscription_group_config_state( &self, broker_addr: CheetahString, group: CheetahString, ) -> ClientResult<MutationSubscriptionGroupConfigState>

Reads presence-aware, allowlisted Subscription Group state from one exact Broker.

Source

async fn replace_subscription_group_config_if_state( &self, broker_addr: CheetahString, group: CheetahString, expected_state: MutationExpectedState, replacement: MutationSubscriptionGroupConfig, ) -> ClientResult<MutationStateCasOutcome>

Creates or fully replaces the allowlisted Subscription Group state under one state CAS.

Source

async fn broker_mutation_config_state( &self, broker_addr: CheetahString, ) -> ClientResult<BrokerMutationConfigState>

Reads only the six Broker settings accepted by supervised control preflight.

Source

async fn reset_consumer_offset_if_current( &self, broker_addr: CheetahString, consumer_group: CheetahString, topic: CheetahString, queue_id: i32, expected_offset: i64, new_offset: i64, ) -> ClientResult<ConditionalConsumerOffsetOutcome>

Applies one exact queue offset transition without route re-resolution or retry.

Source

async fn preview_consumer_offset_reset_on_broker( &self, broker_addr: CheetahString, broker_name: CheetahString, read_queue_nums: u32, consumer_group: CheetahString, topic: CheetahString, timestamp: i64, ) -> ClientResult<Vec<MutationConsumerOffsetPreview>>

Computes exact queue offsets for one already-selected Broker master without mutation.

Source

async fn mutation_consumer_offset( &self, broker_addr: CheetahString, consumer_group: CheetahString, topic: CheetahString, queue_id: i32, ) -> ClientResult<i64>

Re-reads one exact queue offset for postcondition verification.

Source

async fn mutation_message_request_mode( &self, broker_addr: CheetahString, topic: CheetahString, consumer_group: CheetahString, ) -> ClientResult<Option<MutationMessageRequestMode>>

Reads one exact Topic/group request-mode entry from a selected Broker master.

Source

async fn replace_message_request_mode_if_current( &self, broker_addr: CheetahString, topic: CheetahString, consumer_group: CheetahString, expected: MutationExpectedMessageRequestMode, replacement: MutationMessageRequestMode, ) -> ClientResult<MutationMessageRequestModeOutcome>

Conditionally replaces one exact Topic/group request-mode entry.

Source

async fn replace_message_request_mode_if_current_with_timeout( &self, broker_addr: CheetahString, topic: CheetahString, consumer_group: CheetahString, expected: MutationExpectedMessageRequestMode, replacement: MutationMessageRequestMode, timeout_millis: u64, ) -> ClientResult<MutationMessageRequestModeOutcome>

Conditionally replaces one exact Topic/group request-mode entry using the caller’s bounded request timeout.

The default deliberately fails closed so existing trait implementers remain source compatible without silently ignoring the requested timeout.

Source

async fn set_broker_log_filter_ttl( &self, broker_addr: CheetahString, logger: CheetahString, level: CheetahString, ttl_seconds: u32, operation_id: CheetahString, ) -> ClientResult<()>

Applies one bounded Broker logger override with an automatic TTL.

Implementations must reject arbitrary filter expressions. logger identifies one rocketmq_broker:: target, level is limited to INFO or DEBUG, and the TTL is limited to the server-supported diagnostic window.

Source

async fn restore_broker_log_filter( &self, broker_addr: CheetahString, operation_id: CheetahString, ) -> ClientResult<()>

Restores the Broker logger baseline for one bounded operation.

Source

async fn reset_consumer_offset_detailed( &self, cluster_name: CheetahString, topic: CheetahString, consumer_group: CheetahString, timestamp: u64, force: bool, ) -> ClientResult<TopicOffsetMutationOutcome>

Resets each exact broker/queue target independently and retains partial outcomes.

Source

async fn skip_accumulated_message( &self, cluster_name: Option<CheetahString>, topic: CheetahString, consumer_group: CheetahString, force: bool, ) -> ClientResult<usize>

Advances one exact consumer group and Topic to the latest available offsets. This is deliberately separate from timestamp reset because the RocketMQ protocol represents latest with the signed -1 sentinel.

Source

async fn skip_accumulated_message_detailed( &self, cluster_name: CheetahString, topic: CheetahString, consumer_group: CheetahString, force: bool, ) -> ClientResult<TopicOffsetMutationOutcome>

Advances each exact broker/queue target to latest while retaining partial outcomes.

Source

async fn mutation_order_topic_config( &self, topic: CheetahString, ) -> ClientResult<Option<CheetahString>>

Reads the exact NameServer-wide order-topic value used by a supervised mutation guard.

Source

async fn delete_order_topic_config( &self, topic: CheetahString, ) -> ClientResult<()>

Deletes the global order-topic entry after an unordered update or a complete Topic deletion.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§