pub async fn publish(&self, stream: &str, value: Vec<u8>) -> Result<()> {
            let req = PublishRequest {
                value,
                stream: stream.to_string(),
                ack_policy: AckPolicy::Leader as i32,
                partition: 0,
                headers: HashMap::new(),
                ack_inbox: "".to_string(),
                correlation_id: "".to_string(),
                key: Vec::new(),
            };
            self.request(Request::Publish(req)).await?;
            Ok(())
        }
//TODO: subject to change, need to support MessageOptions and proper Ack handling
subject to change, need to support MessageOptions and proper Ack handling
subject to change need to support MessageOptions and proper Ack handling
pub async fn publish(&self, stream: &str, value: Vec<u8>) -> Result<()> {
            let req = PublishRequest {
                value,
                stream: stream.to_string(),
                ack_policy: AckPolicy::Leader as i32,
                partition: 0,
                headers: HashMap::new(),
                ack_inbox: "".to_string(),
                correlation_id: "".to_string(),
                key: Vec::new(),
            };
            self.request(Request::Publish(req)).await?;
            Ok(())
        }
pub async fn publish ( & self , stream : & str , value : Vec < u8 > ) -> Result < ( ) > { let req = PublishRequest { value , stream : stream . to_string ( ) , ack_policy : AckPolicy :: Leader as i32 , partition : 0 , headers : HashMap :: new ( ) , ack_inbox : " " . to_string ( ) , correlation_id : " " . to_string ( ) , key : Vec :: new ( ) , } ; self . request ( Request :: Publish ( req ) ) . await ? ; Ok ( ( ) ) }
TODO: subject to change, need to support MessageOptions and proper Ack handling
TODO : subject to change need to support MessageOptions and proper Ack handling
&self
stream
&str
value
Vec<u8>
&self
stream
&str
value
Vec<u8>