02-12-2020 04:28 AM
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)
03-08-2020 03:38 PM
Hi fbatchelor83,
You can try to upload the .jar which is in the folder where activemq is installed (it should contain activemq-all…):
Than you can populate the other settings as following:
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.
07-22-2021 10:35 PM
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.