# 6. Writing a V2 Kafka Producer

<https://github.com/simplesteph/kafka-avro-course>

![](/files/-MDW8ix3FT4DeBWhkwQ3)

First generate avro object using mvn package  by commenting the whole just placing AVRO file in the resource folder .

![](/files/-MDW9dFwL4bnNwirPzsk)

phone & email field was not available in the customer-avrov1.avsc but we add these two fields on customerv2.avsc. Code is exactly same.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://architectures.gitbook.io/project/apahce-kafka/kafka-confluent-schema-registry-and-rest-proxy/confluent-schema-registry-and-kafka/6.-writing-a-v2-kafka-producer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
