Skip to content
This repository has been archived by the owner on Nov 15, 2020. It is now read-only.

Support sprintf-style stream names #22

Merged
merged 4 commits into from
Sep 2, 2017

Conversation

sonya
Copy link
Contributor

@sonya sonya commented Jul 12, 2017

This PR allows the Kinesis stream name to be dynamic based on the event. This implementation was modeled off Kafka's topic selection, IIRC (I implemented this a long time ago and we've actually been running it for several months).

In our case this allowed us to go from 10 kinesis outputs for 10 streams to 1.

Example config: this will convert the stream name based on the resource_type field in each event.

output {
  kinesis {
    # ...
    stream_name => "%{resource_type}-updates"
  }
}

sonya added 4 commits July 11, 2017 19:12
which was incorrectly anticipating that the leading hyphen would no
longer be preprended when using the newer API that has event.set
@samcday
Copy link
Owner

samcday commented Sep 2, 2017

Aww yeah. This is sweet. And you even contributed more tests! You're a legend!

@samcday samcday merged commit e241b19 into samcday:master Sep 2, 2017
samcday added a commit that referenced this pull request Sep 2, 2017
Support sprintf-style stream names

Former-commit-id: e241b19
@samcday
Copy link
Owner

samcday commented Sep 2, 2017

v5.1.0 is out with this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants