Topic/Partition Initial Offset

有几种方法可以设置分区对的初始偏移量。

There are several ways to set the initial offset for a partition.

在手动分配分区时,可以在已配置“@ [8]”参数(请参阅“@ [9]”)中设置初始偏移量(如果需要)。还可以随时跳转到特定偏移量。

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.

如果你使用分组管理,并且代理分配分区:

When you use group management where the broker assigns partitions:

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

  • 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).