pub struct QueueCommandHandler { /* private fields */ }Expand description
Handles queue-related commands including queue switching and statistics.
Provides functionality for managing queue connections, retrieving queue information, and gathering comprehensive statistics from Azure Service Bus.
§Examples
use quetty_server::service_bus_manager::command_handlers::QueueCommandHandler;
let handler = QueueCommandHandler::new(consumer_manager, statistics_service);
// Switch to a different queue
let response = handler.handle_switch_queue(
"orders".to_string(),
QueueType::Main
).await?;
// Get current queue information
let response = handler.handle_get_current_queue().await?;Implementations§
Source§impl QueueCommandHandler
impl QueueCommandHandler
pub fn new( consumer_manager: Arc<Mutex<ConsumerManager>>, statistics_service: Arc<QueueStatisticsService>, ) -> Self
pub async fn handle_switch_queue( &self, queue_name: String, queue_type: QueueType, ) -> Result<ServiceBusResponse, ServiceBusError>
pub async fn handle_get_current_queue( &self, ) -> Result<ServiceBusResponse, ServiceBusError>
pub async fn handle_get_queue_statistics( &self, queue_name: String, queue_type: QueueType, ) -> Result<ServiceBusResponse, ServiceBusError>
Auto Trait Implementations§
impl !RefUnwindSafe for QueueCommandHandler
impl !UnwindSafe for QueueCommandHandler
impl Freeze for QueueCommandHandler
impl Send for QueueCommandHandler
impl Sync for QueueCommandHandler
impl Unpin for QueueCommandHandler
impl UnsafeUnpin for QueueCommandHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more