Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example in README.md for Creating a Consumer Doesn't Actually ACK messages #130

Closed
d0nutptr opened this issue Jun 30, 2018 · 2 comments
Closed

Comments

@d0nutptr
Copy link

The example on how to create a consumer in the README.md file doesn't appear to ACK messages as they're processed. I still don't really understand tokio all that much but I believe you have to return the ack future to have them processed.

Example of corrected code:

stream.for_each(move |message| {
    debug!("got message: {:?}", message);
    info!("decoded message: {:?}", std::str::from_utf8(&message.data).unwrap());
    ch.basic_ack(message.delivery_tag)
    // remove Ok(())
})

Sorry for the lame issue! I just wanted to make sure this was documented in case anyone is confused like I was why my messages weren't being ack'd :)

@seunlanlege
Copy link

I actually think the examples could be significantly made better.

@Keruspe
Copy link
Collaborator

Keruspe commented Jul 8, 2018

Fixed, thanks

@Keruspe Keruspe closed this as completed Jul 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants