rabbitmq / rabbitmq-objc-client

RabbitMQ client for Objective-C and Swift
https://rabbitmq.com
Other
241 stars 84 forks source link

afterCofirmed called with no ack/nack #168

Closed SimonErm closed 5 years ago

SimonErm commented 5 years ago

Hey, I use publisher confirms by using:

 channel.confirmSelect();
 channel.afterConfirmed{ (acked, nacked) in
            Log.info?.value(acked.count);
            Log.info?.value(nacked.count);
        }

but afterConfirmed is called with no ack/nack. Is this a bug? Maybe related: #157

michaelklishin commented 5 years ago

I don't see how that is possible given its type signature. Sorry but I cannot suggest much without a way to reproduce.

michaelklishin commented 5 years ago

157 as I observed it could be relevant if both sets were empty. Now that I think of it, it could violate some tests' assumptions but it's not an impossible scenario: there can be no acks or nacks delivered at a certain point in time. Why would afterConfirmed be invoked so early (or so late), I'm not sure. We need at least some steps to reproduce or clues from code analysis.

SimonErm commented 5 years ago

Yes, both are empty but there should be an ack because the message is delivered. I am going to provide a sample repo the next days.

michaelklishin commented 5 years ago

@SimonErm thank you. Let's continue in #157 since now it sounds like it might be highly relevant.