diff --git a/api/src/main/java/io/kafbat/ui/controller/MessagesController.java b/api/src/main/java/io/kafbat/ui/controller/MessagesController.java index 62189b04a..b88e2d566 100644 --- a/api/src/main/java/io/kafbat/ui/controller/MessagesController.java +++ b/api/src/main/java/io/kafbat/ui/controller/MessagesController.java @@ -118,10 +118,11 @@ public Mono>> getTopicMessagesV2(Strin if (cursor != null) { messagesFlux = messagesService.loadMessages(getCluster(clusterName), topicName, cursor); } else { + var pollingMode = mode == null ? PollingModeDTO.LATEST : mode; messagesFlux = messagesService.loadMessages( getCluster(clusterName), topicName, - ConsumerPosition.create(checkNotNull(mode), checkNotNull(topicName), partitions, timestamp, offset), + ConsumerPosition.create(pollingMode, checkNotNull(topicName), partitions, timestamp, offset), stringFilter, smartFilterId, limit,