logstash-plugins / logstash-input-azure_event_hubs

Logstash input for consuming events from Azure Event Hubs
Apache License 2.0
18 stars 28 forks source link

Set partition id as option #44

Open ram-pi opened 4 years ago

ram-pi commented 4 years ago

It would be very useful to have the possibility of selecting the partition id. So it could possible to read from a particular partition.

moritz-tr commented 4 years ago

I think you can handle this via a condition on the @metadata field. Make sure to set the decorate_events => true on the azure_event input to access this field. Your output should look like this:

output {
if [@metadata][azure_event_hubs][partition] == "0" {
    elasticsearch { ... }
  }
}
ram-pi commented 4 years ago

Is there something similar on the input side I can do?