# Impact of optional Header fields in Kafka

**URL:** <https://forum.confluent.io/t/impact-of-optional-header-fields-in-kafka/3660>\
**Category:** Architecture and Design\
**Created:** [15 December 2021 03:18 UTC](https://forum.confluent.io/t/impact-of-optional-header-fields-in-kafka/3660 "2021-12-15T03:18:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dha22](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@dha22](https://forum.confluent.io/u/dha22)\
**Post date:** [15 December 2021 03:18 UTC](https://forum.confluent.io/t/impact-of-optional-header-fields-in-kafka/3660/1 "2021-12-15T03:18:06Z")

</div>

Hi,

I would like to know the impacts of using optional header fields in Kafka messages. i.e. All the messages will have set of default header fields and in addition to that, a selected set of messages (few messages) will have another set of optional header fields.  
e.g.

- 100,000 messages with default header fields.
- 1 message with default header + additional header field

By doing so, will there be a header size increase for other messages. And as a result, will there be an overall size increase in the Kafka topic partition log file.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![mitchell-h](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mitchell-h/32/1129_2.png) [@mitchell-h](https://forum.confluent.io/u/mitchell-h)\
**Post date:** [16 December 2021 21:59 UTC](https://forum.confluent.io/t/impact-of-optional-header-fields-in-kafka/3660/2 "2021-12-16T21:59:50Z")

</div>

Headers are stored inline with the messages. There are no default headers or fields applied. If you add headers to one message, that will not increase the size of any other message.
