Dynamic topics for kafka output plugin

Hi guys,
assuming that i have the following json input:

{
  "user": "1",
  "compay_id": "100"
}

can i set compay_id to kafka output topic_id?

thanks in advance,

ronnysh

Did you try?

we're still in design phase, i was interested to know if anyone experience such requirement.

Yes you can. You would be using a sprintf statement (https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#sprintf) note that is only works on outputs.

1 Like

this exactly what we need!

thanks!