pub struct MassTransitOptions {
pub message_type: String,
pub correlation_id: Option<String>,
pub source_address: Option<String>,
pub destination_address: Option<String>,
}Expand description
MassTransit-specific options for message publishing
Fields§
§message_type: StringMessage type in URN format: “urn:message:Namespace:TypeName” or simple format: “Namespace:TypeName” (will be converted to URN)
correlation_id: Option<String>Optional correlation ID
source_address: Option<String>Optional source address (defaults to exchange/queue if not provided)
destination_address: Option<String>Optional destination address (defaults to routing_key/queue if not provided)
Implementations§
Source§impl MassTransitOptions
impl MassTransitOptions
Sourcepub fn new(message_type: impl Into<String>) -> Self
pub fn new(message_type: impl Into<String>) -> Self
Create new MassTransit options with message type
Sourcepub fn with_correlation_id(self, correlation_id: impl Into<String>) -> Self
pub fn with_correlation_id(self, correlation_id: impl Into<String>) -> Self
Set correlation ID
Sourcepub fn with_source_address(self, source_address: impl Into<String>) -> Self
pub fn with_source_address(self, source_address: impl Into<String>) -> Self
Set source address
Sourcepub fn with_destination_address(
self,
destination_address: impl Into<String>,
) -> Self
pub fn with_destination_address( self, destination_address: impl Into<String>, ) -> Self
Set destination address
Trait Implementations§
Source§impl Clone for MassTransitOptions
impl Clone for MassTransitOptions
Source§fn clone(&self) -> MassTransitOptions
fn clone(&self) -> MassTransitOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MassTransitOptions
impl RefUnwindSafe for MassTransitOptions
impl Send for MassTransitOptions
impl Sync for MassTransitOptions
impl Unpin for MassTransitOptions
impl UnwindSafe for MassTransitOptions
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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