-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
In subscription::get_messages the ack_ids are decoupled from the converted messages, since the function returns two vectors.
let messages = response.received_messages.unwrap_or_default();
let ack_ids: Vec<String> = messages
.as_slice()
.iter()
.map(|packet| packet.ack_id.clone())
.collect();
let packets = messages
.into_iter()
.filter_map(|packet| match T::from(packet.message) {
Ok(o) => Some(o),
Err(e) => {
error!("Failed converting pubsub {}", e,);
None
}
})
.collect();
Ok((packets, ack_ids))If messages cannot be converted, they are dropped. So how would I know which ack_id is for which message? On the happy path the are correlated by index, but if some messages are dropped, that is no longer the case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request