Skip to content

AMQ::Client::Async::Channel#on_ack calls non-existent #use_publisher_confirmations! #25

@eliaslevy

Description

@eliaslevy

If a channel is does not have publisher confirmation on when the #on_ack method is called, #on_ack will attempt to turn confirmations on by calling #use_publisher_confirmations!. As that method does not exist, it will cause a NoMethodError exception.

The problem goes back 2 years. 5653b07 renamed #confirmations to #use_publisher_confirmations!. It also added the line to #on_ack to call #use_publisher_confirmations! if confirmations were not on. The same day you renamed #use_publisher_confirmations! to #confirm_select, but failed to change the reference in #on_ack (a092ae0).

Since then the code got moved around, but its remained otherwise the same. You last commit related to it moved the code into AMQ::Client::Async::Channel.

This bug has been around for 2 years and we never triggered it since we always call #confirm_select in the channel before using it. But something in the latest commits must have broken how we were using #confirm_select leaving the channel with confirms off by the time we call #on_ack, thus triggering this old bug.

I am going to dig further to find out why the channel is reaching #on_ack with confirms off in the latest code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions