All Apps and Add-ons

Role of queue prefix in configuring jms queues

ManishaAgrawal
Explorer

I have a clustered IBM MQ, where both Queue Managers have different jndi provider , but same queue names. Data from both the Queue Managers should have the same sourcetype, should go to same set of indexes and use same transforms.

Since both QMs have same topic names but different jndi, how should I configure inputs.conf ? is there any role of queue prefix in creating different stanzas ?Saying that, if two stanzas in inputs.conf are entirely same except for the queue prefix and jndi provider, will they be processed differently and will data land into indexes from both sources ?

Thanks!
Manisha

0 Karma
1 Solution

Damien_Dallimor
Ultra Champion

Since both QMs have same topic names .... This is the purpose of the prefix value. It is simply used so that when you have destination names (topic / queue ) that are the same , that you will not have naming clashes in inputs.conf (the queue/topic name is used to form the inputs.conf stanza name).

Further more , for better reuse of propertys common to all you stanzas that you want to inherit , then use a parent JMS stanza to inherit from.

Purely an example (using ActiveMQ) , but you should get the point.

[jms]
sourcetype = foo
index = goo
jndi_initialcontext_factory = org.apache.activemq.jndi.ActiveMQInitialContextFactory

[jms://topic/prefix1:sometopic]
jms_connection_factory_name = ConnectionFactory1 
jndi_provider_url = tcp://somehost:61616

[jms://topic/prefix2:sometopic]
jms_connection_factory_name = ConnectionFactory2
jndi_provider_url = tcp://anotherhost:61616

View solution in original post

0 Karma

Damien_Dallimor
Ultra Champion

Since both QMs have same topic names .... This is the purpose of the prefix value. It is simply used so that when you have destination names (topic / queue ) that are the same , that you will not have naming clashes in inputs.conf (the queue/topic name is used to form the inputs.conf stanza name).

Further more , for better reuse of propertys common to all you stanzas that you want to inherit , then use a parent JMS stanza to inherit from.

Purely an example (using ActiveMQ) , but you should get the point.

[jms]
sourcetype = foo
index = goo
jndi_initialcontext_factory = org.apache.activemq.jndi.ActiveMQInitialContextFactory

[jms://topic/prefix1:sometopic]
jms_connection_factory_name = ConnectionFactory1 
jndi_provider_url = tcp://somehost:61616

[jms://topic/prefix2:sometopic]
jms_connection_factory_name = ConnectionFactory2
jndi_provider_url = tcp://anotherhost:61616
0 Karma

ManishaAgrawal
Explorer

Thanks Damien.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...