# Reading from jms with input-jms

**URL:** <https://discuss.elastic.co/t/reading-from-jms-with-input-jms/106968>\
**Category:** Logstash\
**Created:** [November 9, 2017, 5:42am UTC](https://discuss.elastic.co/t/reading-from-jms-with-input-jms/106968 "2017-11-09T05:42:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [November 9, 2017, 5:42am UTC](https://discuss.elastic.co/t/reading-from-jms-with-input-jms/106968/1 "2017-11-09T05:42:40Z")

</div>

guys hello,

i test to read message from websphere mq,  
logstash 5.5.2 - windows 8  
elasticsearch 5.5.2 - linux  
websphere mq 8.0.0.4

i have 2 test case:  
#1) with filter in logstash.conf  
#2) without filter

#1) average logstash handle 215 message in second  
#2) avergate logstash handle 350 message in second

is it possible to increase throughput?

jms.yml  
# IBM WebSphere MQ  
wmq:  
🏭 com.ibm.mq.jms.MQQueueConnectionFactory  
:queue\_manager: QMTEST  
:host\_name: 192.168.0.181  
:channel: LOGSTASH.CHL  
:port: 1414  
# Transport Type: com.ibm.mq.jms.JMSC::MQJMS\_TP\_CLIENT\_MQ\_TCPIP  
:transport\_type: 1  
:username: Test  
:require\_jars:  
- "C:/distr/logstash-5.6.2/jms/jms-1.0.2b.jar"  
- "C:/distr/logstash-5.6.2/jms/com.ibm.mq.jar"  
- "C:/distr/logstash-5.6.2/jms/com.ibm.mqjms.jar"  
- "C:/distr/logstash-5.6.2/jms/com.ibm.mq.allclient.jar"

logstash\_jms.conf

nugusbayevkk@mediator:~/Downloads$ cat logstash\_jms.conf  
input {  
jms {  
yaml\_file =\> "C:/distr/logstash-5.6.2/jms/jms.yml"  
yaml\_section =\> "wmq"  
include\_header =\> false  
include\_properties =\> false  
include\_body =\> true  
use\_jms\_timestamp =\> false  
destination =\> "TEST.LOG"  
interval =\> 3  
runner =\> async  
add\_field =\> ["host", "computer\_name"]  
}  
}

filter {  
xml {  
source =\> message  
store\_xml =\> false  
xpath =\> {  
"//RqUID/text()|//MsgID/text()|//RqID/text()" =\> "RqUID"  
"//Operation/text()" =\> "operation"  
"//EventId/text()" =\> "event\_id"  
"//EventMsg" =\> "event\_msg"  
"//EventDate/text()" =\> "event\_date"  
"//ProcStatus/text()" =\> "proc\_status"  
"//ErrorText/text()" =\> "error\_text"  
"//EventSource/text()" =\> "event\_source"  
"//EventReceiver/text()" =\> "event\_receiver"  
"//SourceQueue/text()" =\> "source\_queue"  
"//SourceQM/text()" =\> "source\_qm"  
"//TargetQueue/text()" =\> "target\_queue"  
"//TargetQM/text()" =\> "target\_qm"  
"//ReplyQueue/text()" =\> "reply\_queue"  
"//ReplyQM/text()" =\> "reply\_qm"  
}

}

mutate {  
remove\_field =\> ["headers"]  
}

}

output {  
elasticsearch {  
hosts =\> ["192.168.0.171:9200"]  
index =\> "bus-%{+YYYY.MM.dd}"  
}  
}

message string size about 1000.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 9, 2017, 8:03am UTC](https://discuss.elastic.co/t/reading-from-jms-with-input-jms/106968/2 "2017-11-09T08:03:04Z")

</div>

Have you tried varying the number of [threads](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jms.html#plugins-inputs-jms-threads) for the input plugin to see if that makes any difference?

---

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [November 9, 2017, 9:21am UTC](https://discuss.elastic.co/t/reading-from-jms-with-input-jms/106968/3 "2017-11-09T09:21:24Z")

</div>

ok, thanks Christian, after testing cases with threading i will write my results.

---

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [November 9, 2017, 9:57am UTC](https://discuss.elastic.co/t/reading-from-jms-with-input-jms/106968/4 "2017-11-09T09:57:33Z")

</div>

3# case: 4 threads - about 253 handled message/sec with filter  
4# case: 3 threads - about 258 handled message/sec with filter

Christian thanks, here i tested on my notebooks, and i use wifi-network, so i think on test, or production environment, throughput must increase.

---

<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, 2017, 9:57am UTC](https://discuss.elastic.co/t/reading-from-jms-with-input-jms/106968/5 "2017-12-07T09:57:33Z")

</div>

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