@Override public void shutdown() { try { producer.close(); pulsarClient.close(); } catch (final Exception ex) { } }
@Override public void close() throws Exception { log.info("Shutting down Pulsar benchmark driver"); if (client != null) { client.close(); } if (adminClient != null) { adminClient.close(); } log.info("Pulsar benchmark driver successfully shut down"); }
@Override public void close() { if (closed) { return; } closed = true; threadGroup.interrupt(); fnCache.close(); try { pulsarClient.close(); } catch (PulsarClientException e) { log.warn("Failed to close pulsar client when closing function container factory", e); } } }
@Override public void stop() { if (null != producer) { try { producer.close(); } catch (PulsarClientException e) { log.warn("Failed to close producer", e); } } if (null != reader) { try { reader.close(); } catch (IOException e) { log.warn("Failed to close reader", e); } } if (null != client) { try { client.close(); } catch (IOException e) { log.warn("Failed to close client", e); } } }
@Override public void close() throws IOException { if (pulsarClient != null) { pulsarClient.close(); } if (authenticationService != null) { authenticationService.close(); } if (globalZkCache != null) { globalZkCache.close(); } executor.shutdown(); orderedExecutor.shutdown(); }
pulsarClient.close();
client.close(); } catch (Exception e) { LOG.error("Error while producing messages");
client.close(); } catch (Exception e) { LOG.error("Error while consuming messages");
pulsarClient.close();
client.close(); client = null;