Topic/Partition Initial Offset

There are several ways to set the initial offset for a partition.spring-doc.cn

When manually assigning partitions, you can set the initial offset (if desired) in the configured TopicPartitionOffset arguments (see Message Listener Containers). You can also seek to a specific offset at any time.spring-doc.cn

When you use group management where the broker assigns partitions:spring-doc.cn

  • For a new group.id, the initial offset is determined by the auto.offset.reset consumer property (earliest or latest).spring-doc.cn

  • For an existing group ID, the initial offset is the current offset for that group ID. You can, however, seek to a specific offset during initialization (or at any time thereafter).spring-doc.cn