The KafkaOffsetUDR
is used to determine an offset which is not at the beginning or the end of collection, and only applies if you have selected Start at requested in the Kafka Collection agent configuration dialog - see 9.4849.6.1 Kafka Real-time Collection Agent Configuration. The Kafka collection agent waits for the KafkaOffsetUDR
and does not consume before the offset information. Messages can be persisted to a database or aggregation agent.
Note | ||
---|---|---|
| ||
If you send a |
The following fields are included in the KafkaOffsetUDR
:
Field | Description | |||||
---|---|---|---|---|---|---|
offsets (map<int,long>) | This field is populated with offset information. As offsets in Kafka are unique per partition, this maps partition identifiers (int) to an offset (long). | |||||
offsetsAsString (string) | This field contains a comma separated key-value list. It is available as a convenience for populating with offset information, as it provides a simple way to store the map with partitions and offset as a string. It reads and writes the same underlying data as the
|
Example of KafkaOffsetUDR
In this example the Kafka collection agent has been configured to start at requested offset. To ensure that the offsets are updated in ascending order, it is recommended that you configure the outgoing route from the Kafka collection agent to be Synchronous.
Note | ||
---|---|---|
| ||
If you configure the outgoing route from the Kafka Collection agent to be Asynchronous (Default), you must use different APL logic from the example below so that you only save the highest offset values for each partition. |
Example workflow with KafkaOffsetUDR
Info | |||||||
---|---|---|---|---|---|---|---|
| |||||||
An example of how the APL code may be in the Analysis Agent:
|