# \[ERROR\]\[logstash.outputs.jms \] Unknown setting 'properties' for jms

**URL:** <https://discuss.elastic.co/t/error-logstash-outputs-jms-unknown-setting-properties-for-jms/156942>\
**Category:** Logstash\
**Created:** [November 15, 2018, 9:14pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-jms-unknown-setting-properties-for-jms/156942 "2018-11-15T21:14:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lindmin](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@Lindmin](https://discuss.elastic.co/u/Lindmin)\
**Post date:** [November 15, 2018, 9:14pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-jms-unknown-setting-properties-for-jms/156942/1 "2018-11-15T21:14:27Z")

</div>

Hello,

We are currently trying to migrate our log centralisation handle by old logstash 2.3.2 to logstash 6.5.0.

But, we encounter an error :  
[ERROR][logstash.outputs.jms] Unknown setting 'properties' for jms

there is the output :  
jms {  
yaml\_file =\> "/product/LOGSTASH/conf/conf.yml"  
yaml\_section =\> "ems"  
destination =\> "Q.ELASTIC.INFO"  
properties =\> { "REPORT\_TYPE" =\> "%{type}" }  
}

i didn't find any doc about the possibility of add jms properties in jms output logstash plugin in the logstash 6.5.0 doc.

How I can do it ?

Thank you.

---

<div class="post-metadata">

**Author:** ![Lindmin](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@Lindmin](https://discuss.elastic.co/u/Lindmin)\
**Post date:** [November 16, 2018, 9:24am UTC](https://discuss.elastic.co/t/error-logstash-outputs-jms-unknown-setting-properties-for-jms/156942/2 "2018-11-16T09:24:27Z")

</div>

Actually, it was a manual modification of the ruby code.

Here the code for thoses are interested vby this functionality  
cd %logstashInstall%/vendor/bundle/jruby/%VERSION\_RUBY%/gems/logstash-output-jms-%VERSION\_PLUGIN%/lib/logstash/outputs  
cp jms.rb jms.rb\_backup

add a getter/setter for the properties :  
config :properties, :validate =\> :hash

Then modify the receive function :

```
 begin
        #MODIFICATION, get message in variable
        message=@session.message(event.to_json)
 
        jms_properties={}
 
        #iterate on the properties specified in the logstash pipeline config, then add it to the message
        @properties.each do |prop,value|
           jms_properties[prop]=event.sprintf(value)
        end
        message.properties=jms_properties
        #then send the message
        @producer.send(message)
      rescue => e
        @logger.warn("Failed to send event to JMS", :event => event, :exception => e,
                     :backtrace => e.backtrace)
      end
```

---

<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 14, 2018, 9:24am UTC](https://discuss.elastic.co/t/error-logstash-outputs-jms-unknown-setting-properties-for-jms/156942/3 "2018-12-14T09:24:34Z")

</div>

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