# Share variable between events

**URL:** <https://discuss.elastic.co/t/share-variable-between-events/65122>\
**Category:** Logstash\
**Created:** [November 6, 2016, 6:28am UTC](https://discuss.elastic.co/t/share-variable-between-events/65122 "2016-11-06T06:28:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ze.gitan](https://avatars.discourse-cdn.com/v4/letter/z/838e76/32.png) [@ze.gitan](https://discuss.elastic.co/u/ze.gitan)\
**Post date:** [November 6, 2016, 6:28am UTC](https://discuss.elastic.co/t/share-variable-between-events/65122/1 "2016-11-06T06:28:33Z")

</div>

I'm currently working on a plugin that requires a piece of information to be shared between events. I've been looking over some articles, but don't see an appropriate way to do this. Essentially I have a connection object that needs used in every event. Rather than having to create a new object for every event (there is going to be a high volume of events coming through), I would like to use this single connection object for all of the events coming through.

Is this something that is even possible?

---

<div class="post-metadata">

**Author:** ![TWalter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/twalter/32/41239_2.png) [@TWalter](https://discuss.elastic.co/u/TWalter)\
**Post date:** [November 9, 2016, 12:09am UTC](https://discuss.elastic.co/t/share-variable-between-events/65122/2 "2016-11-09T00:09:35Z")

</div>

Hello,  
maybe if you only need fields of the object in every event, store this object in elasticsearch and use the elasticsearch-filter-plugin to join the information to every new event 😉

I hope it is helpful 😉

---

<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:** [December 7, 2016, 12:09am UTC](https://discuss.elastic.co/t/share-variable-between-events/65122/3 "2016-12-07T00:09:35Z")

</div>

Closed on December 7, 2016, 12:09am UTC

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