Skip to content

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

Description

@Andy-Richards

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.

:-)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions