简体   繁体   中英

Connect to a local ActiveMQ Artemis queue in JBoss EAP 7.3

We are creating ActiveMQ Artemis queues in JBoss EAP 7.3 and calling them from a remote application developed using Spring Boot. Till now, we are using the protocol http-remoting for connecting to a remote ActiveMQ Artemis and we are using the connecting factory as jms/RemoteConnectionFactory . These set of configurations are working correctly.

Now we will deploy the Spring Boot application in the same JBoss server in which the queues are created and we need to access the queues locally instead of remotely. For accessing the queues locally, we are changing the connection factory to jms/ConnectionFactory . Can anyone please suggest me what is the protocol that needs to be used for accessing the queues locally instead of http-remoting ?

When accessing resources via JNDI in the same JVM you don't need to specify anything in your InitialContext properties. An empty InitialContext will be automatically populated with the necessary info to lookup local resources.

If you must configure JNDI properties for some reason then you can simply set java.naming.factory.initial to org.wildfly.naming.client.WildFlyInitialContextFactory . Nothing else is needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM