# Is it possible to specify a partition key when using filebeat to send to a Kafka topic?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-specify-a-partition-key-when-using-filebeat-to-send-to-a-kafka-topic/94732>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 27, 2017, 4:06am UTC](https://discuss.elastic.co/t/is-it-possible-to-specify-a-partition-key-when-using-filebeat-to-send-to-a-kafka-topic/94732 "2017-07-27T04:06:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [July 27, 2017, 3:14pm UTC](https://discuss.elastic.co/t/is-it-possible-to-specify-a-partition-key-when-using-filebeat-to-send-to-a-kafka-topic/94732/2 "2017-07-27T15:14:46Z")

</div>

Yes, see [key](https://www.elastic.co/guide/en/beats/filebeat/current/kafka-output.html#_key) and [partition](https://www.elastic.co/guide/en/beats/filebeat/current/kafka-output.html#_partition) settings. Note, using `key` is optional when using the hash partitioner. You can define a list events fields that should be used to compute the hash. Difference is, when using key, the key will be used as event key in kafka as well (it must be unique).

---

_[View the full topic](https://discuss.elastic.co/t/is-it-possible-to-specify-a-partition-key-when-using-filebeat-to-send-to-a-kafka-topic/94732)._
