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
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.