/// Writes an event with a routing key.
///
/// Same as the write_event.
Writes an event with a routing key.
Same as the write_event.
Writes an event with a routing key . Same as the write_event .
pub async fn write_event_by_routing_key(
        &mut self,
        routing_key: String,
        event: Vec<u8>,
    ) -> oneshot::Receiver<Result<(), Error>> {
        let size = event.len();
        let (tx, rx) = oneshot::channel();
        let routing_info = RoutingInfo::RoutingKey(Some(routing_key));
        if let Some(pending_event) = PendingEvent::with_header(routing_info, event, None, tx) {
            let append_event = Incoming::AppendEvent(pending_event);
            self.writer_event_internal(append_event, size, rx).await
        } else {
            rx
        }
    }
pub async fn write_event_by_routing_key ( & mut self , routing_key : String , event : Vec < u8 > , ) -> oneshot :: Receiver < Result < ( ) , Error > > { let size = event . len ( ) ; let ( tx , rx ) = oneshot :: channel ( ) ; let routing_info = RoutingInfo :: RoutingKey ( Some ( routing_key ) ) ; if let Some ( pending_event ) = PendingEvent :: with_header ( routing_info , event , None , tx ) { let append_event = Incoming :: AppendEvent ( pending_event ) ; self . writer_event_internal ( append_event , size , rx ) . await } else { rx } }
Writes an event with a routing key.
Writes an event with a routing key .
&mut self
routing_key
String
event
Vec<u8>