# Logstash pipeline workers instance variables

**URL:** <https://discuss.elastic.co/t/logstash-pipeline-workers-instance-variables/84231>\
**Category:** Logstash\
**Created:** [May 2, 2017, 9:39am UTC](https://discuss.elastic.co/t/logstash-pipeline-workers-instance-variables/84231 "2017-05-02T09:39:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Conall\_Prendergast](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@Conall\_Prendergast](https://discuss.elastic.co/u/Conall_Prendergast)\
**Post date:** [May 2, 2017, 9:39am UTC](https://discuss.elastic.co/t/logstash-pipeline-workers-instance-variables/84231/1 "2017-05-02T09:39:04Z")

</div>

Hi,

I am writing a filter plugin that caches some information from events and may use that to populate other events. Something like marking a tcp handshake packets with details of the handshake (whether or not the handshake was initialized).

At the moment I am using an instance variable "@handshakes" to hold some information about each handshake.

My question is this:  
Can I use logstash pipeline workers \> 1 when doing this? ie. Can pipeline workers share variables like this?

Thanks

---

<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:** [May 30, 2017, 9:53am UTC](https://discuss.elastic.co/t/logstash-pipeline-workers-instance-variables/84231/2 "2017-05-30T09:53:12Z")

</div>

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