Offset
An offset is a position or displacement measured relative to a reference point, such as within an ordered sequence, memory region, or layout.
Kafka Streams in Action, Second Edition
An offset is a nonnegative integer that identifies a record's logical position within a Kafka partition and advances sequentially as records are appended.
- How it is used
- Tracks consumer read progress and supplies the starting position for broker fetch requests.
- How deep it goes
- Defines offsets, traces fetching and commits, and descends into index-based physical record lookup.
- Examples
- Uses sequential consumer batches, offset commits, partition logs, and a Spring Kafka produce callback.
- What you can do after
- Operate/configure consumer progress by selecting fetch positions and committing processed offsets.
Read how Kafka Streams in Action, Second Edition explains offset →
Apache Kafka in Action
An offset is a position marker identifying a record's location within a Kafka partition or a connector's processed source sequence.
- How it is used
- Tracks record positions and consumer progress within Kafka partitions, and processed positions in Kafka Connect source streams.
- How deep it goes
- Explains assignment, gaps, reading positions, reset choices, and storage trade-offs without detailing an offset-management implementation.
- Examples
- Uses a console consumer reading from the beginning, a rebuilding cache, transactional database writes, and database or file source positions.
- What you can do after
- Operate/configure it: choose a starting position and an offset-storage approach suited to consumer recovery.
Kafka for Architects
A Kafka offset is a monotonically increasing integer that identifies a record's position within a partition or ordered record stream.
- How it is used
- Identifies records within partitions and tracks where consumer groups resume reading.
- How deep it goes
- Defines partition positions and elaborates commit timing, explicit positioning, lag, and failure handling without descending into broker internals.
- Examples
- Uses local-store population, out-of-order worker completion, poison records, and database update timestamps to show offset decisions.
- What you can do after
- Operate/configure consumer positioning and commits; diagnose lag or a repeatedly failing record using offsets.
Akka in Action, Second Edition
An offset is a position marker identifying how far a stream consumer has progressed through an ordered sequence of records.
- How it is used
- Tracks consumer progress so projections and Kafka streams can resume processing after restarts.
- How deep it goes
- Explains stored per-tag and per-group positions through projection tables, commits, restarts, and delivery guarantees.
- Examples
- Uses cargo journal projections with per-tag offset rows and a Kafka plain consumer printing record offsets.
- What you can do after
- Operate/configure Kafka consumers and projections to persist progress and select restart delivery behavior.
GPU Programming with Triton
An offset is an index displacement used to address an element within a data region.
- How it is used
- Maps logical work coordinates to memory addresses so GPU kernels can load and store the intended tensor elements.
- How deep it goes
- Defines flat offsets as index–stride sums and works through multidimensional mappings, while leaving thread-level execution to Triton’s compiler.
- Examples
- Uses vector and matrix indexing, plus RoPE’s paired input and angle offsets, to illustrate address calculation.
- What you can do after
- Build memory addresses from logical indices and strides, then check bounds and ensure output locations are assigned correctly.
Also covered in
- API Design Patterns
- Troubleshooting Java, Second Edition
- Think Distributed Systems
- Web Design Playground, Second Edition
- Deep Learning with PyTorch, Second Edition
- Build Financial Software with Generative AI (From Scratch)
- Web Design Playground
- Learn Haskell by Example
What to know first
- partitionA division of a whole into distinct parts that together comprise the whole.
- topicA topic is a named channel or category that groups messages or records for publication and delivery to interested consumers.
- messageA message is a discrete unit of information or data communicated between participants or software components, often represented as a structured record.
- timestampA timestamp is a value representing a specific point in time, commonly associated with an event or data item.
Related concepts
- strideproduced by · Stride is the step or spacing between successive positions in an array access or successive placements of an operation over input data.
- consumer groupused by · A consumer group is a logical set of message consumers that consume one or more streams under a shared group identity, with message delivery coordinated among its members.
- __consumer_offsetspart of · __consumer_offsets is Kafka’s internal topic for storing committed offsets that record consumer groups’ reading positions.
- clientused by · A client is a person, organization, device, or software component that receives or uses a product, service, resource, or functionality provided by another party or system.
- fetch requestused by · A fetch request is a Kafka protocol request that asks a broker to return records from a topic partition beginning at a specified offset.
Questions about offset
What is offset?
An offset is a position or displacement measured relative to a reference point, such as within an ordered sequence, memory region, or layout.
Which Manning books explain offset?
Kafka Streams in Action, Second Edition, Apache Kafka in Action, Kafka for Architects, Akka in Action, Second Edition and GPU Programming with Triton.
What should I know before learning offset?
Manning books that teach offset usually introduce partition, topic, message and timestamp first.
What is offset part of?
Offset is part of __consumer_offsets. __consumer_offsets is Kafka’s internal topic for storing committed offsets that record consumer groups’ reading positions.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




