Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open

Description

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.

:-)

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

        AltStyle によって変換されたページ (->オリジナル) /