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

Chapter 2 python examples - msg_ids.append(len(msg_ids) + 1) #8

Open
Andy-Richards opened this issue Nov 21, 2012 · 0 comments
Open

Comments

@Andy-Richards
Copy link

Hi, I think python / chapter-2 / hello_world_producer_pubconfirm.py / Line 47 is a bug although my python knowledge isn't great so Ive not added a pull request until this is confirmed?

If the msg_ids set is empty i.e. all previous messages have been ack'ed msg_ids.append(len(msg_ids) + 1) looks to append 1 to the set when a new message is published. Later at line 31 if a successful ack is received we try and remove the delivery_tag from the set which i believe wont exist as delivery_tag is a incrementing seq no and therefore not equal to 1 as appended above. I think the src should be calling channel.next_publish_seqno (or whatever the python equivalent is) and appending this to the set instead. The blog example here http://www.rabbitmq.com/blog/2011/02/10/introducing-publisher-confirms/ uses such an approach.

:-)

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

1 participant