# Integrating Solace PubSub+ with Logstash

**URL:** <https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317>\
**Category:** Connectors & Integrations\
**Tags:** logs, integration, logstash, elastic\
**Created:** [July 14, 2020, 3:28pm UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317 "2020-07-14T15:28:16Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![arih](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/arih/32/130_2.png) [@arih](https://community.solace.com/u/arih)\
**Post date:** [July 14, 2020, 3:28pm UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317/1 "2020-07-14T15:28:16Z")

</div>

Logging is a crucial part of your applications, especially enterprise applications. If you’re still writing logs to a database, you really need to read [this](https://solace.com/blog/integrating-solace-with-logstash/) 🙂 This post shows how to use Solace as the pipeline to your ELK stack, replacing your slow and heavy JDBC insert operations with a JMS send operations. Let Solace be the shock-absorber and decouple your applications from the logging systems, no back pressure FTW!  
I’m writing a couple of other posts around logging, but here’s the first one. What do you think? Still want to write to database and get that extra elapsed time waiting for JDBC inserts? Or risking the application to stuck only waiting for log-written confirmation? Or maybe you’d prefer Fluentd? 🙂 I’m curios to hear your thoughts!

> **[Integrating Solace PubSub+ with Logstash | Solace](https://solace.com/blog/integrating-solace-with-logstash/)**
>
> Connect Solace with Logstash, an open source server-side data processing pipeline that ingests data transforms it, and sends it to your favorite "stash."

---

<div class="post-metadata">

**Author:** ![marc](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/marc/32/2191_2.png) [@marc](https://community.solace.com/u/marc)\
**Post date:** [July 14, 2020, 7:31pm UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317/2 "2020-07-14T19:31:23Z")

</div>

Hi @arih,  
Thanks for sharing. In your blog you used Elastic stack running on GCP. Is there anything specific to GCP that you did or would your blog work with open source elastic stack as well?

-Marc

---

<div class="post-metadata">

**Author:** ![arih](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/arih/32/130_2.png) [@arih](https://community.solace.com/u/arih)\
**Post date:** [July 15, 2020, 12:34am UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317/3 "2020-07-15T00:34:33Z")

</div>

hey @marc, should work with any Logstash installation, just sometimes different version of Logstash might have a different file name or location for the config. I used Bitnami just as a quick pick on the marketplace, no specific reasons 🙂

---

<div class="post-metadata">

**Author:** ![marc](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/marc/32/2191_2.png) [@marc](https://community.solace.com/u/marc)\
**Post date:** [July 15, 2020, 1:32pm UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317/4 "2020-07-15T13:32:32Z")

</div>

Awesome, thanks @arih. Looking forward to your next blog 🙂

---

<div class="post-metadata">

**Author:** ![chmielej](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@chmielej](https://community.solace.com/u/chmielej)\
**Post date:** [September 28, 2021, 3:00pm UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317/5 "2021-09-28T15:00:29Z")

</div>

Hi @arih,  
In your blog you were using JNDI based connection to Solace using basic auth. I wonder if you had a chance to test as well client certificate authentication?  
Best regards,  
Jacek

---

<div class="post-metadata">

**Author:** ![arih](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/arih/32/130_2.png) [@arih](https://community.solace.com/u/arih)\
**Post date:** [September 29, 2021, 3:19am UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317/6 "2021-09-29T03:19:45Z")

</div>

hi Jacek,

Unfortunately I have not tested it with cert auth last time. Did you try and find error?

I think it’s more on how we set it up on logstash JMS input side though, the Solace auth config is documented [here](https://docs.solace.com/Configuring-and-Managing/Configuring-Client-Authentication.htm#Client-Cert).

---

<div class="post-metadata">

**Author:** ![chmielej](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@chmielej](https://community.solace.com/u/chmielej)\
**Post date:** [September 29, 2021, 11:47am UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317/7 "2021-09-29T11:47:54Z")

</div>

Finally I was able to sort it out. This is the Logstash configuration that works with client certificate auth which should be added inside jndi\_context section:  
‘javax.net.ssl.keyStore’ =\> ‘pathToKeystore.jks’  
‘javax.net.ssl.keyStorePassword’ =\> ‘keyStorePassword’  
‘Solace\_JMS\_Authentication\_Scheme’ =\> ‘AUTHENTICATION\_SCHEME\_CLIENT\_CERTIFICATE’

---

<div class="post-metadata">

**Author:** ![arih](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/arih/32/130_2.png) [@arih](https://community.solace.com/u/arih)\
**Post date:** [September 29, 2021, 12:49pm UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317/8 "2021-09-29T12:49:51Z")

</div>

Glad that you worked that out, and much appreciated to share that with everybody 😃

---

<div class="post-metadata">

**Author:** ![marc](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/marc/32/2191_2.png) [@marc](https://community.solace.com/u/marc)\
**Post date:** [September 29, 2021, 5:03pm UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317/9 "2021-09-29T17:03:08Z")

</div>

Thanks for sharing the solution @chmielej!

Do you mind sharing your entire jms input config so it’s clear for future folks that come across this thread?  
That would help answer a question such as do these options go under just `input.jms` or under `input.jms.jndicontext`

Thanks again for sharing!

---

<div class="post-metadata">

**Author:** ![chmielej](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@chmielej](https://community.solace.com/u/chmielej)\
**Post date:** [September 30, 2021, 7:20am UTC](https://community.solace.com/t/integrating-solace-pubsub-with-logstash/317/10 "2021-09-30T07:20:29Z")

</div>

Here is my Logstash input config:  
jms {  
include\_header =\> true  
include\_properties =\> true  
include\_body =\> true  
use\_jms\_timestamp =\> false  
destination =\> ‘SolaceQueue’  
pub\_sub =\> false  
jndi\_name =\> ‘/jms/cf/default’  
jndi\_context =\> {  
‘java.naming.factory.initial’ =\> ‘com.solacesystems.jndi.SolJNDIInitialContextFactory’  
‘java.naming.security.principal’ =\> ‘@vpn’  
‘java.naming.provider.url’ =\> ‘url’  
‘javax.net.ssl.trustStore’ =\> ‘pathToTrustStore.jks’  
‘javax.net.ssl.trustStorePassword’ =\> ‘trustStorePassword’  
‘javax.net.ssl.keyStore’ =\> ‘pathToKeyStore’  
‘javax.net.ssl.keyStorePassword’ =\> ‘keyStorePassword’  
‘Solace\_JMS\_Authentication\_Scheme’ =\> ‘AUTHENTICATION\_SCHEME\_CLIENT\_CERTIFICATE’  
}  
require\_jars =\> [‘pathToRequiredJars’]  
}
