score:0

1) the recommended way to check if a topic exists is to use the adminclient api.

you can use listtopics() or describetopics().

2) assuming you don't have any privilege access to the cluster (to check metrics or liveness probes), the only way to check the cluster is running is to try connecting to/use it.

with the adminclient, you can use describecluster(), for example, to attempt to retrieve the state of the cluster.


Related Query

More Query from same tag