Skip to content

Commit

Permalink
Resolves 40315 & 41432 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dcotfr committed Feb 28, 2025
1 parent 7ea970e commit 614d0f0
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.regex.Pattern;
import java.util.stream.Stream;

import jakarta.enterprise.inject.Instance;
import jakarta.inject.Inject;

import org.apache.kafka.streams.Topology;
Expand All @@ -16,11 +17,16 @@

public class KafkaStreamsJsonRPCService {
@Inject
Topology topology;
Instance<Topology> topologyProvider;

@NonBlocking
public JsonObject getTopology() {
return parseTopologyDescription(topology.describe() != null ? topology.describe().toString() : "");
var topologyDescription = "";
if (topologyProvider.isResolvable()) {
final var describe = topologyProvider.get().describe();
topologyDescription = describe != null ? describe.toString() : "";
}
return parseTopologyDescription(topologyDescription);
}

JsonObject parseTopologyDescription(String topologyDescription) {
Expand Down

0 comments on commit 614d0f0

Please sign in to comment.