[Broker] Close transactionBufferClient before closing the internal Pulsar client
transactionBufferClient uses the Pulsar client
@@ -487,6 +487,10 @@ public class PulsarService implements AutoCloseable, ShutdownService {
transactionBufferSnapshotService = null;
}
+ if (transactionBufferClient != null) {
+ transactionBufferClient.close();
+ }
+
if (client != null) {
client.close();
client = null;
@@ -519,10 +523,6 @@ public class PulsarService implements AutoCloseable, ShutdownService {
protocolHandlers = null;
}
- if (transactionBufferClient != null) {
- transactionBufferClient.close();
- }
-
if (coordinationService != null) {
coordinationService.close();
}
