Publishing messages to a JMS server on another machine

只愿长相守 提交于 2019-12-11 11:32:57

问题


I need to publish messages to a topic on a JMS server running on a different machine. The server on the remote machine is Glassfish v3 (OpenMQ). From reading other posts here, I think I need to tell the remote broker to accept JMS messages from a different IP than his own i.e not localhost. Actually, I'd like that remote broker to accept message from remote as well as the local machine.

Problem is, I can't figure out how to configure the remote machine's embedded broker, OpenMQ. I think it is possible from the Glassfish console, but can't figure it out. In jboss you'd execute with a -b 0.0.0.0, but the remote machine is not running jboss. It's Glassfish/OpenMQ. I'm new to all this as you can tell.

I think I know how to set up the JNDI context on the "local" machine that is publishing the messages to the other, remote machine. I've seen examples.


回答1:


The Glassfish built-in OpenMQ configuration file is:

GLASSFISH_HOME/glassfish/domains/domain1/imq/instances/imqbroker/props/config.properties

Here you may want to set

imq.hostname

Though the default seems to be accepting connections from anywhere according to the docs.



来源:https://stackoverflow.com/questions/3907301/publishing-messages-to-a-jms-server-on-another-machine

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!