cancel
Showing results for 
Search instead for 
Did you mean: 

JMS Consumer ActiveMQ

fbatchelor83
New Contributor

Hello, I need help configuring JMS Consumer to consumer an ActiveMQ queue.

I am stuck at the validating account part.

Connection Factory: org.apache.archivemq.jndi.ActiveMQInitialContextFactory
I’ve added the JAR & populated:
InitialContext.INITIAL_CONTEXT_FACTORY
InitialContext.PROVIDER_URL
Context.SECURITY_PRINCIPAL
Context.SECURITY_CREDENTIALS

I get this error when validating:

Failed to validate account: activemq is undefined. (Reason: activemq is undefined.; Resolution: Check the spelling of the variable)

2 REPLIES 2

jovan_j
New Contributor III

Hi fbatchelor83,

You can try to upload the .jar which is in the folder where activemq is installed (it should contain activemq-all…):
image

Than you can populate the other settings as following:
image

Connection Factory: = ConnectionFactory
JNDI Properties:

Property Name Property Value Value
java.naming.factory.initial org.apache.activemq.jndi.ActiveMQInitialContextFactory Default
java.naming.provider.url tcp://hostname:port This value is shown when activeMQ is started
queue.MyQueue Created in activeMQ console

Regards, Jovan.

avinashpatil
New Contributor

Hello Jovan,
Thanks for sharing JMS Active MQ account configuration. I am trying to configure Active MQ account account on my local machine but getting below error.
“Failed to validate account: An error occurred while creating the connection from the connection factory (Name: connFact) Cause: Could not connect to broker URL: tcp://PC1J57TA:61616. Reason: java.net.UnknownHostException: PC1J57TA (Reason: Could not connect to broker URL: tcp://PC1J57TA:61616. Reason: java.net.UnknownHostException: PC1J57TA; Resolution: Please verify the user credentials)”
I have also added TCP connectivity and connection details. Please let me know what is missing in a setup.
JMS_MQ