Struct rabbitmq_stream_client::Client
source · 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 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 create_stream( &self, stream: &str, options: HashMap<String, String> ) -> RabbitMQStreamResult<GenericResponse>
pub async fn delete_stream( &self, 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>> ) -> RabbitMQStreamResult<Vec<u64>>
pub async fn query_publisher_sequence( &self, reference: &str, stream: &str ) -> Result<u64, ClientError>
Trait Implementations§
Auto Trait Implementations§
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