Skip to content

Commit

Permalink
handle bootstrap server
Browse files Browse the repository at this point in the history
Signed-off-by: hemahg <[email protected]>
  • Loading branch information
hemahg committed Sep 11, 2024
1 parent 2ca741f commit 246fd14
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ export function ResetConsumerOffset({
const fetchBootstrapServer = async () => {
try {
const data = await getKafkaCluster(kafkaId);
if (!data) {
return null;
}
const listeners = data.attributes.listeners || [];
if (listeners.length > 0) {
setBootstrapServer(listeners[0].bootstrapServer);
setBootstrapServer(listeners[0].bootstrapServers ?? "");
} else {
throw new Error("No listeners found");
}
Expand Down

0 comments on commit 246fd14

Please sign in to comment.