pub struct Client { /* private fields */ }
Expand description
Raw API for taking to RabbitMQ stream
For high level APIs check crate::Environment
Implementations§
Source§impl Client
impl Client
pub async fn connect( opts: impl Into<ClientOptions>, ) -> Result<Client, ClientError>
Sourcepub async fn server_properties(&self) -> HashMap<String, String>
pub async fn server_properties(&self) -> HashMap<String, String>
Get client’s server properties.
Sourcepub async fn connection_properties(&self) -> HashMap<String, String>
pub async fn connection_properties(&self) -> HashMap<String, String>
Get client’s connection properties.
pub async fn set_handler<H: MessageHandler>(&self, handler: H)
pub fn is_closed(&self) -> bool
pub async fn close(&self) -> RabbitMQStreamResult<()>
pub async fn subscribe( &self, subscription_id: u8, stream: &str, offset_specification: OffsetSpecification, credit: u16, properties: HashMap<String, String>, ) -> RabbitMQStreamResult<GenericResponse>
pub async fn unsubscribe( &self, subscription_id: u8, ) -> RabbitMQStreamResult<GenericResponse>
pub async fn partitions( &self, super_stream: String, ) -> RabbitMQStreamResult<SuperStreamPartitionsResponse>
pub async fn route( &self, routing_key: String, super_stream: String, ) -> RabbitMQStreamResult<SuperStreamRouteResponse>
pub async fn create_stream( &self, stream: &str, options: HashMap<String, String>, ) -> RabbitMQStreamResult<GenericResponse>
pub async fn create_super_stream( &self, super_stream: &str, partitions: Vec<String>, binding_keys: Vec<String>, options: HashMap<String, String>, ) -> RabbitMQStreamResult<GenericResponse>
pub async fn delete_stream( &self, stream: &str, ) -> RabbitMQStreamResult<GenericResponse>
pub async fn delete_super_stream( &self, super_stream: &str, ) -> RabbitMQStreamResult<GenericResponse>
pub async fn credit( &self, subscription_id: u8, credit: u16, ) -> RabbitMQStreamResult<()>
pub async fn metadata( &self, streams: Vec<String>, ) -> RabbitMQStreamResult<HashMap<String, StreamMetadata>>
pub async fn store_offset( &self, reference: &str, stream: &str, offset: u64, ) -> RabbitMQStreamResult<()>
pub async fn query_offset( &self, reference: String, stream: &str, ) -> Result<u64, ClientError>
pub async fn declare_publisher( &self, publisher_id: u8, publisher_reference: Option<String>, stream: &str, ) -> RabbitMQStreamResult<GenericResponse>
pub async fn delete_publisher( &self, publisher_id: u8, ) -> RabbitMQStreamResult<GenericResponse>
pub async fn publish<T: BaseMessage>( &self, publisher_id: u8, messages: impl Into<Vec<T>>, version: u16, ) -> RabbitMQStreamResult<Vec<u64>>
pub async fn query_publisher_sequence( &self, reference: &str, stream: &str, ) -> Result<u64, ClientError>
pub async fn exchange_command_versions( &self, ) -> RabbitMQStreamResult<ExchangeCommandVersionsResponse>
pub fn filtering_supported(&self) -> bool
Sourcepub async fn set_heartbeat(&self, heartbeat: u32)
pub async fn set_heartbeat(&self, heartbeat: u32)
Don’t use this method in production code.
pub async fn consumer_update( &self, correlation_id: u32, offset_specification: OffsetSpecification, ) -> RabbitMQStreamResult<GenericResponse>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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