kafka: keep track of producer offset

Havnar

I'm using Apache Kafka (no confluent) and have a simple Kafka producer that pulls from a rest API, sends data to Kafka and shuts down. I had this for testing while I was developing a consumer.

In the consumer I can keep track of the offset, but I don't seem to be able to set a custom offset in my producer.

In my rest calls I would need to keep track of a date so that I don't pull the same data all the time. Am I forced to store that "last timestamp" myself or am I missing something?

ppatierno

I think that in your scenario you aren't interested in a "Kafka" offset on the producer side (when you write to Kafka) but an "offset" tracing latest data you pulled from the REST API so you are right you have to do that by yourself. On the Kafka producer side you are able to know the offset assigned to the latest sent message (inside the RecordMetadata) but it has no relationship with the latest timestamp when you pulled data from the REST API.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Who keeps track of the last read message offset of the consumer in Apache Kafka?

分類Dev

Improving performance of Kafka Producer

分類Dev

Kafka Authentication Producer Unable to Connect Producer

分類Dev

Keep track of password in Ubuntu

分類Dev

Kafka producer sending invalid characters

分類Dev

Kafka Producer design - multiple topics

分類Dev

Keep track of clients currently on a page

分類Dev

Kafka consumer manual commit offset

分類Dev

Kafka Offset after retention period

分類Dev

Invalid Timestamp when writing a Kafka producer with sarama

分類Dev

How to enable Kafka Producer Metrics in Spark?

分類Dev

How to keep track of depth in breadth first search?

分類Dev

How to keep track of number of objects created in java

分類Dev

How does CPython keep track of the type of an object

分類Dev

Keep track on biggest element in FIFO queue

分類Dev

XQuery basics - how to keep track of multiple variables?

分類Dev

Incorrect Kafka offset across consumer groups

分類Dev

Kafka Producer Callbackパフォーマンス

分類Dev

How to Improve Performance of Kafka Producer when used in Synchronous Mode

分類Dev

Kafka producer and consumer on separate computers aren't communicating

分類Dev

Spring-Kafka Integration 1.0.0.RELEASE Issue with Producer

分類Dev

Kafka 2.9.1 producer 0.8.2.1 compile vs runtime dependencies

分類Dev

Java/Scala Kafka Producer does not send message to topic

分類Dev

WARN New offset is higher than latest offset. Why I cannot change offset in Kafka?

分類Dev

Kafka Producer deployed on Kubernetes not able to produce to Kafka cluster running on local machine

分類Dev

How do you keep track of your comments in issues on GitHub?

分類Dev

should I keep track of vertex descriptors in boost graph library?

分類Dev

How to keep track of a value after I update the component in react 16.3

分類Dev

How can I keep input track log in shiny, then print it and save it?

Related 関連記事

  1. 1

    Who keeps track of the last read message offset of the consumer in Apache Kafka?

  2. 2

    Improving performance of Kafka Producer

  3. 3

    Kafka Authentication Producer Unable to Connect Producer

  4. 4

    Keep track of password in Ubuntu

  5. 5

    Kafka producer sending invalid characters

  6. 6

    Kafka Producer design - multiple topics

  7. 7

    Keep track of clients currently on a page

  8. 8

    Kafka consumer manual commit offset

  9. 9

    Kafka Offset after retention period

  10. 10

    Invalid Timestamp when writing a Kafka producer with sarama

  11. 11

    How to enable Kafka Producer Metrics in Spark?

  12. 12

    How to keep track of depth in breadth first search?

  13. 13

    How to keep track of number of objects created in java

  14. 14

    How does CPython keep track of the type of an object

  15. 15

    Keep track on biggest element in FIFO queue

  16. 16

    XQuery basics - how to keep track of multiple variables?

  17. 17

    Incorrect Kafka offset across consumer groups

  18. 18

    Kafka Producer Callbackパフォーマンス

  19. 19

    How to Improve Performance of Kafka Producer when used in Synchronous Mode

  20. 20

    Kafka producer and consumer on separate computers aren't communicating

  21. 21

    Spring-Kafka Integration 1.0.0.RELEASE Issue with Producer

  22. 22

    Kafka 2.9.1 producer 0.8.2.1 compile vs runtime dependencies

  23. 23

    Java/Scala Kafka Producer does not send message to topic

  24. 24

    WARN New offset is higher than latest offset. Why I cannot change offset in Kafka?

  25. 25

    Kafka Producer deployed on Kubernetes not able to produce to Kafka cluster running on local machine

  26. 26

    How do you keep track of your comments in issues on GitHub?

  27. 27

    should I keep track of vertex descriptors in boost graph library?

  28. 28

    How to keep track of a value after I update the component in react 16.3

  29. 29

    How can I keep input track log in shiny, then print it and save it?

ホットタグ

アーカイブ