pub enum QueueType {
Main,
DeadLetter,
}Expand description
Type of Service Bus queue for routing and processing messages.
Distinguishes between main queues (for normal message processing) and dead letter queues (for messages that cannot be processed successfully).
§Examples
use quetty_server::service_bus_manager::QueueType;
let queue_type = QueueType::from_queue_name("my-queue");
assert_eq!(queue_type, QueueType::Main);
let dlq_type = QueueType::from_queue_name("my-queue/$deadletterqueue");
assert_eq!(dlq_type, QueueType::DeadLetter);Variants§
Implementations§
Source§impl QueueType
impl QueueType
Sourcepub fn from_queue_name(queue_name: &str) -> Self
pub fn from_queue_name(queue_name: &str) -> Self
Determines the queue type from a queue name.
Analyzes the queue name to determine if it’s a dead letter queue
(ends with /$deadletterqueue) or a main queue.
§Arguments
queue_name- The full queue name to analyze
§Returns
QueueType::DeadLetter if the name ends with /$deadletterqueue,
QueueType::Main otherwise
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QueueType
impl<'de> Deserialize<'de> for QueueType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for QueueType
impl StructuralPartialEq for QueueType
Auto Trait Implementations§
impl Freeze for QueueType
impl RefUnwindSafe for QueueType
impl Send for QueueType
impl Sync for QueueType
impl Unpin for QueueType
impl UnwindSafe for QueueType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<D> DeserializeWith<JsonFormat> for Dwhere
D: DeserializeOwned,
impl<D> DeserializeWith<JsonFormat> for Dwhere
D: DeserializeOwned,
fn deserialize_with<'async_trait>(
body: ResponseBody,
) -> Pin<Box<dyn Future<Output = Result<D, Error>> + Send + 'async_trait>>where
D: 'async_trait,
Source§impl<D> DeserializeWith<JsonFormat> for Dwhere
D: DeserializeOwned,
impl<D> DeserializeWith<JsonFormat> for Dwhere
D: DeserializeOwned,
fn deserialize_with<'async_trait>(
body: ResponseBody,
) -> Pin<Box<dyn Future<Output = Result<D, Error>> + Send + 'async_trait>>where
D: 'async_trait,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.