You're right, this is a bug. The abort method is rarely used, so I guess this is why this bug has been there for so many years.
@wes: I'm using the latest 5.9.0 java client version.
@Arnaud: I see, but if you check the code, you will see, that abort() does not call "this.connection.deleteRecordedConsumer()" and "this.connection.unregisterChannel()" which results in a memory leak, so my question is what's the recommended way to use the api to close a channel.
Br,
Peter
On Monday, October 19, 2020 at 10:41:29 AM UTC+2 Arnaud Cogoluegnes wrote:
The close and abort method have the same behavior in terms of protocol frames, etc, with only one difference with a "abort" flag, which internal Javadoc says "abort: true if we should close and ignore errors". This means basically that any exception happening during the closing sequence is not propagated with abort.
________________________________________
From:
rabbitm...@googlegroups.com <
rabbitm...@googlegroups.com> on behalf of Péter Mihály Avramucz <
mucz...@gmail.com>
Sent: Monday, October 19, 2020 9:17 AM
To: rabbitmq-users
Subject: [rabbitmq-users] AutorecoveringChannel close() vs abort()
Hi All,
I'm having an issue where using an AutorecoveringConnection (and AutorecoveringChannel) when I call abort() on the channel, it is closed, but the consumer is not removed from the connection resulting in a memory leak. Calling close() corrently removed the consumer.
The JavaDoc of the method says nothing about this (or it's my eyes). Could someone describe what should be the correct usage here? Calling close() and if the channel still seems open, call abort()?
Br,
Peter
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
rabbitmq-user...@googlegroups.com<mailto:
rabbitmq-user...@googlegroups.com>.