Skip to content

Commit e5479ca

Browse files
committed
Update topic ControlPlane example to support custom codecs
1 parent 82be1bf commit e5479ca

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ydb-cookbook/src/main/java/tech/ydb/examples/topic/ControlPlane.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import org.slf4j.Logger;
1212
import org.slf4j.LoggerFactory;
13+
1314
import tech.ydb.core.Result;
1415
import tech.ydb.core.grpc.GrpcTransport;
1516
import tech.ydb.topic.TopicClient;
@@ -224,11 +225,11 @@ public TopicDescription describeTopic(String topicPath, TopicClient topicClient)
224225
.append("Retention storage mb: ").append(description.getRetentionStorageMb()).append("\n");
225226

226227
message.append("Supported codecs:\n");
227-
List<Codec> supportedCodecs = description.getSupportedCodecs().getCodecs();
228+
List<?> supportedCodecs = description.getSupportedCodecs().getCodecs();
228229
if (supportedCodecs.isEmpty()) {
229230
message.append(" none\n");
230231
}
231-
for (Codec codec : supportedCodecs) {
232+
for (Object codec : supportedCodecs) {
232233
message.append(" ").append(codec).append("\n");
233234
}
234235

@@ -238,11 +239,11 @@ public TopicDescription describeTopic(String topicPath, TopicClient topicClient)
238239
.append(" Important: ").append(consumer.isImportant()).append("\n")
239240
.append(" Read from: ").append(consumer.getReadFrom()).append("\n")
240241
.append(" Supported codecs: \n");
241-
List<Codec> codecs = consumer.getSupportedCodecs().getCodecs();
242+
List<?> codecs = consumer.getSupportedCodecsList();
242243
if (codecs.isEmpty()) {
243244
message.append(" none\n");
244245
}
245-
for (Codec codec : codecs) {
246+
for (Object codec : codecs) {
246247
message.append(" ").append(codec).append("\n");
247248
}
248249

0 commit comments

Comments
 (0)