# JMS Queue consume based on criteria

**URL:** <https://discuss.elastic.co/t/jms-queue-consume-based-on-criteria/53005>\
**Category:** Logstash\
**Created:** [June 16, 2016, 2:32pm UTC](https://discuss.elastic.co/t/jms-queue-consume-based-on-criteria/53005 "2016-06-16T14:32:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckayay](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@ckayay](https://discuss.elastic.co/u/ckayay)\
**Post date:** [June 16, 2016, 2:32pm UTC](https://discuss.elastic.co/t/jms-queue-consume-based-on-criteria/53005/1 "2016-06-16T14:32:07Z")

</div>

Hi All,

Is it possible to consume a message in JMS queue from Logstash, based on the content of the message?  
I am trying to read messages which is greater than 5 min old from the JMS Queue with log stash. (by looking at the time stamp of the message)

BR,  
CK

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 21, 2016, 5:31am UTC](https://discuss.elastic.co/t/jms-queue-consume-based-on-criteria/53005/2 "2016-06-21T05:31:47Z")

</div>

> Is it possible to consume a message in JMS queue from Logstash, based on the content of the message?

I don't know. Does JMS itself provide such a feature?

---

<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:** [July 6, 2017, 4:51am UTC](https://discuss.elastic.co/t/jms-queue-consume-based-on-criteria/53005/3 "2017-07-06T04:51:41Z")

</div>


