# Apm server publishing data to single kakfa topic partition

**URL:** <https://discuss.elastic.co/t/apm-server-publishing-data-to-single-kakfa-topic-partition/199113>\
**Category:** APM\
**Tags:** server\
**Created:** [September 11, 2019, 5:23pm UTC](https://discuss.elastic.co/t/apm-server-publishing-data-to-single-kakfa-topic-partition/199113 "2019-09-11T17:23:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishnu\_Singhal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishnu_singhal/32/52488_2.png) [@Vishnu\_Singhal](https://discuss.elastic.co/u/Vishnu_Singhal)\
**Post date:** [September 11, 2019, 5:23pm UTC](https://discuss.elastic.co/t/apm-server-publishing-data-to-single-kakfa-topic-partition/199113/1 "2019-09-11T17:23:00Z")

</div>

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text 🙂

**Kibana version** :NA

**Elasticsearch version** : NA

**APM Server version** : 7.1.2

**APM Agent language and version** : Java

**Browser version** : NA

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: docker

**Fresh install or upgraded from other version?** NA

**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs? using kafka output

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**: I have enabled data publishing of transaction, span , beat on kafka. But problem is it is publishing all data to single kafka topic partition. It should be publishing to different partitions.

**Steps to reproduce** :

1. Enabled kafka output.  
2.Did following configuration in apm-server.yaml
2. 

**Errors in browser console (if relevant)**: NA  
**Provide logs and/or server output (if relevant)**:

output.kafka:  
enabled: true  
hosts: ["kafka:9092"]  
topic: '%{[processor.event]}'  
key: '%{[transaction.id]}'

How can i publish on different partitions of the kafka topic, so that its distributed ?

---

<div class="post-metadata">

**Author:** ![Vishnu\_Singhal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishnu_singhal/32/52488_2.png) [@Vishnu\_Singhal](https://discuss.elastic.co/u/Vishnu_Singhal)\
**Post date:** [September 11, 2019, 5:45pm UTC](https://discuss.elastic.co/t/apm-server-publishing-data-to-single-kakfa-topic-partition/199113/2 "2019-09-11T17:45:02Z")

</div>

what does reachable\_only does? somewhat not clear with difference in true/false

---

<div class="post-metadata">

**Author:** ![jalvz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalvz/32/45613_2.png) [@jalvz](https://discuss.elastic.co/u/jalvz)\
**Post date:** [September 12, 2019, 6:49am UTC](https://discuss.elastic.co/t/apm-server-publishing-data-to-single-kakfa-topic-partition/199113/3 "2019-09-12T06:49:12Z")

</div>

Hi!

You can find the answer in the official docs: [https://www.elastic.co/guide/en/apm/server/current/kafka-output.html#topics-option-kafka](https://www.elastic.co/guide/en/apm/server/current/kafka-output.html#topics-option-kafka)

`reachable_only` will cause unavailable partitions to be skipped.

---

<div class="post-metadata">

**Author:** ![Vishnu\_Singhal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishnu_singhal/32/52488_2.png) [@Vishnu\_Singhal](https://discuss.elastic.co/u/Vishnu_Singhal)\
**Post date:** [September 20, 2019, 3:03pm UTC](https://discuss.elastic.co/t/apm-server-publishing-data-to-single-kakfa-topic-partition/199113/4 "2019-09-20T15:03:52Z")

</div>

I have enabled the same but still transaction and spans are published only in 0th partition .

output.kafka:  
enabled: true  
hosts: ["kafka:9092"]  
topic: '%{[processor.event]}'  
key: '%{[transaction.id]}'  
partition.round\_robin:  
reachable\_only: true

---

<div class="post-metadata">

**Author:** ![jalvz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalvz/32/45613_2.png) [@jalvz](https://discuss.elastic.co/u/jalvz)\
**Post date:** [September 23, 2019, 7:40am UTC](https://discuss.elastic.co/t/apm-server-publishing-data-to-single-kakfa-topic-partition/199113/5 "2019-09-23T07:40:53Z")

</div>

Hi, you need a `topics` attribute as described in the docs, not simply `topic`.  
Does that makes sense?

---

<div class="post-metadata">

**Author:** ![Vishnu\_Singhal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishnu_singhal/32/52488_2.png) [@Vishnu\_Singhal](https://discuss.elastic.co/u/Vishnu_Singhal)\
**Post date:** [September 23, 2019, 2:28pm UTC](https://discuss.elastic.co/t/apm-server-publishing-data-to-single-kakfa-topic-partition/199113/6 "2019-09-23T14:28:54Z")

</div>

I'm only using transactions and span

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 14, 2019, 10:28am UTC](https://discuss.elastic.co/t/apm-server-publishing-data-to-single-kakfa-topic-partition/199113/7 "2019-10-14T10:28:58Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
