class KafkaOperations implements AutoCloseable {

    public NodeList getClusterNodes() {
        final List<NodeDetails> nodeDetails = new ArrayList<>();

        try {
            final Collection<Node> nodes = adminClient.describeCluster().nodes().get();
            for (final Node node : nodes) {
                nodeDetails.add(new NodeDetails(node.id(), node.host(), node.port(), node.rack()));
            }
            return new NodeList(nodeDetails);
        } catch (final ExecutionException e) {
            throw handleExecutionException(e);
        } catch (final InterruptedException e)  {
            throw new RuntimeException(e.getMessage(), e);
        }
    }

    public  KafkaOperations(final AdminClient adminClient, final KafkaConsumer<String, String> consumerClient);

}