Skip to content

Instantly share code, notes, and snippets.

@ikwattro
Created April 5, 2017 05:58
Show Gist options
  • Save ikwattro/3001779dcdda1bb58ffd4cc3a81e8f40 to your computer and use it in GitHub Desktop.
Save ikwattro/3001779dcdda1bb58ffd4cc3a81e8f40 to your computer and use it in GitHub Desktop.
offset zero
@org.springframework.kafka.annotation.KafkaListener(topics = "test", topicPartitions = {@TopicPartition(topic = "test", partitionOffsets = @PartitionOffset(initialOffset = "0", partition = "0"))})
    public void listen(String message) {
        System.out.println("Received message on " + System.currentTimeMillis() + " and message was :" + message);
    }
    ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment