Thank you for your patience!
I know your modification will take effect.
and I think "if not consumer.is_declared(self)" is TRUE only after "self._set_current_channel(channel)" has been called;
so I think declare consumers after "self._set_current_channel(channel)" below is a good idea.
try: autoretry_method = self.connection.autoretry( execute_method, channel=self.channel, max_retries=retry, errback=on_error, interval_start=self.interval_start or 1, interval_step=self.interval_stepping, interval_max=self.interval_max, on_revive=on_reconnection) ret, channel = autoretry_method() self._set_current_channel(channel) return ret
Thank you for your patience!
I know your modification will take effect.
and I think "if not consumer. is_declared( self)" is TRUE only after "self._ set_current_ channel( channel) " has been called;
so I think declare consumers after "self._ set_current_ channel( channel) " below is a good idea.
try:
autoretry_ method = self.connection .autoretry(
execute_ method, channel= self.channel,
max_retries= retry,
errback= on_error,
interval_ start=self. interval_ start or 1,
interval_ step=self. interval_ stepping,
interval_ max=self. interval_ max,
on_revive= on_reconnection )
self. _set_current_ channel( channel)
ret, channel = autoretry_method()
return ret