question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Send headers while producing to a Kafka topic

See original GitHub issue

https://github.com/authorjapps/hello-kafka-stream-testing/issues/1

Background

From Slack: Question from: Kushagra @authorjapps is it possible to send a message to a Kafka topic with a particular header? I know we can do that in http. Please advise!

AC1:

As a developer or SDET I want to produce a record with header(s) to a desired Kafka topic So that I verify the business flow related to the headers. e.g.

                "records":[
                    {
                        "key": "${RANDOM.NUMBER}",
                        "value": "Hello World",
                          "headers": {
                                  "key1" : "value1",
                                  "key2" : "value2",
                          }
                          ...
                    }

AC2:

As a developer or Test Engineer I want a help page or a Wiki to learn the usage of the producing and consuming of a Kafka record with headers So that I can easily implement this into the test automation in my project. Wiki todo(Ask for edit permission) : https://github.com/authorjapps/zerocode/wiki/Kafka-records-with-headers

SDET: Software Developer Engineer in Test

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
kt09commented, May 27, 2020

@authorjapps apologies for the late response and sorry for not getting to AC2 before 21st. I will look into the AC2 and will reach out once I’m on it. And yes it is important! 😃 Many thanks!

0reactions
authorjappscommented, Jun 11, 2020

Hello @kt09 , Just checking… did you get chance to complete the AC2?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding Custom Headers in Kafka Message - Stack Overflow
Kafka v0.11.0.0 adds support for custom headers. You can add them when creating a ProducerRecord like this: new ProducerRecord(key, value, headers, .
Read more >
Adding Custom Header to Kafka Message Example
In this tutorial we demonstrate how to add/read custom headers to/from a Kafka Message using Spring Kafka. We start by adding headers using ......
Read more >
Adding headers to a Kafka producer record - IBM
Use the headers.include.sourceid property to add source-identifier as a Kafka header (by default, source-identifier is the first eight characters ...
Read more >
Top 5 Things Every Apache Kafka Developer Should Know
Apache Kafka 0.11 introduced the concept of record headers. Record headers give you the ability to add some metadata about the Kafka record, ......
Read more >
Query Apache Kafka Message Headers | Lenses.io Blog
Kafka Headers act in much the same way as headers for HTTP. They add metadata to your message on top of the payload...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found