rabbitmq-java-client
rabbitmq-java-client copied to clipboard
There is no RecoveryCallback counterpart for RecoveryListener
This is based on 5.5.0.
When implementing a recovery listener, I noticed that there is no RecoveryCallback counterpart for a RecoveryListener, to support lambda style of registering a callback. For most listeners (ShutdownListener, ConfirmListener, ...) we have such counterpart.
Is this something we want to add?
I'm happy to create a PR for this.
If it's a matter of adding a "lambda-version" then I'd say please submit a PR :)
Sure, why not. This is likely to be a breaking change though, so it will go in 6.x, not in 5.x.
OK, will do in the next days. Do you agree that the callback for denoting the start of recovery (https://github.com/rabbitmq/rabbitmq-java-client/blob/master/src/main/java/com/rabbitmq/client/RecoveryListener.java#L38) is the first argument, and the the callback for denoting the completion of recovery (https://github.com/rabbitmq/rabbitmq-java-client/blob/master/src/main/java/com/rabbitmq/client/RecoveryListener.java#L30) is the second argument of the new addRecoveryListener(cb 1, cb 2) method?
This looks reasonable to me. WDYT @michaelklishin?