我需要为JBoss Messaging打开哪些端口?

时间:2016-10-12 21:16:22

标签: jboss jms netty

我使用standalone.xml配置运行jboss eap 6.4。

然而,JBoss和客户端之间存在防火墙。我需要打开哪些端口才能通过简单的JMS客户端进行连接?

只是4447?还是5445和6745?

连接工厂字符串远程连接的是什么?我可以使用"jms/connectionFactory"还是应该复制standalone.xml中的一个字符串?

我的standalone.xml的相关部分如下所示。

<?xml version='1.0' encoding='UTF-8'?>

<server xmlns="urn:jboss:domain:1.7">
    <profile>

        <subsystem xmlns="urn:jboss:domain:messaging:1.3">
            <hornetq-server>
                <persistence-enabled>true</persistence-enabled>
                <security-enabled>false</security-enabled>
                <jmx-management-enabled>true</jmx-management-enabled>
                <journal-file-size>102400</journal-file-size>
                <journal-min-files>2</journal-min-files>
                <connectors>
                    <connector name="first-jms-connector">
                        <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
                        <param key="host" value="156.33.241.5"/>
                        <param key="port" value="5445"/>
                    </connector>
                    <connector name="second-jms-connector">
                        <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
                        <param key="host" value="156.33.241.5"/>
                        <param key="port" value="6745"/>
                    </connector>
                    <netty-connector name="netty" socket-binding="messaging"/>
                    <in-vm-connector name="in-vm" server-id="0"/>
                </connectors>
                <acceptors>
                    <netty-acceptor name="netty" socket-binding="messaging"/>
                    <in-vm-acceptor name="in-vm" server-id="0"/>
                </acceptors>
                <security-settings>
                    <security-setting match="#">
                        <permission type="send" roles="basic_user_role"/>
                        <permission type="consume" roles="basic_user_role"/>
                        <permission type="createNonDurableQueue" roles="basic_user_role"/>
                        <permission type="deleteNonDurableQueue" roles="basic_user_role"/>
                        <permission type="manage" roles="basic_user_role"/>
                    </security-setting>
                </security-settings>
                <address-settings>
                    <!-- first topic -->
                    <address-setting match="jms.topic.first">
                        <dead-letter-address>jms.queue.DLQ</dead-letter-address>
                        <expiry-address>jms.queue.ExpiryQueue</expiry-address>
                        <redelivery-delay>0</redelivery-delay>
                        <max-size-bytes>250857600</max-size-bytes>
                        <page-size-bytes>25085760</page-size-bytes>
                        <address-full-policy>PAGE</address-full-policy>
                        <message-counter-history-day-limit>10</message-counter-history-day-limit>
                    </address-setting>
                    <!--default for catch all-->
                    <address-setting match="#">
                        <dead-letter-address>jms.queue.DLQ</dead-letter-address>
                        <expiry-address>jms.queue.ExpiryQueue</expiry-address>
                        <redelivery-delay>0</redelivery-delay>
                        <max-size-bytes>10485760</max-size-bytes>
                        <page-size-bytes>5048576</page-size-bytes>
                        <address-full-policy>PAGE</address-full-policy>
                        <message-counter-history-day-limit>10</message-counter-history-day-limit>
                    </address-setting>
                </address-settings>
                <jms-connection-factories>
                    <connection-factory name="InVmConnectionFactory">
                        <connectors>
                            <connector-ref connector-name="in-vm"/>
                        </connectors>
                        <entries>
                            <entry name="java:/ConnectionFactory"/>
                            <entry name="java:/first/jms/ConnectionFactory"/>
                        </entries>
                    </connection-factory>
                    <connection-factory name="RemoteConnectionFactory">
                        <connectors>
                            <connector-ref connector-name="netty"/>
                        </connectors>
                        <entries>
                            <entry name="RemoteConnectionFactory"/>
                            <entry name="java:jboss/exported/jms/connectionFactory"/>
                        </entries>
                    </connection-factory>
                    <pooled-connection-factory name="hornetq-ra">
                        <transaction mode="none"/>
                        <connectors>
                            <connector-ref connector-name="in-vm"/>
                        </connectors>
                        <entries>
                            <entry name="java:/JmsXA"/>
                        </entries>
                    </pooled-connection-factory>
                </jms-connection-factories>
                <jms-destinations>
                    <jms-queue name="SecondQueue">
                        <entry name="queue/second"/>
                        <entry name="java:jboss/exported/queue/second"/>
                        <durable>false</durable>
                    </jms-queue>
                    <jms-queue name="SecondDispatcher">
                        <entry name="queue/dispatcher"/>
                        <entry name="java:jboss/exported/queue/dispatcher"/>
                        <durable>false</durable>
                    </jms-queue>
                </jms-destinations>
            </hornetq-server>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:naming:1.2">
            <remote-naming/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:remoting:1.1">
            <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
        </subsystem>
    </profile>
    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:100}">
        <socket-binding name="messaging" port="5445"/>
        <socket-binding name="remoting" port="4447"/>
    </socket-binding-group>
</server>

0 个答案:

没有答案