使 Artemis 从复制使用 SSL

Make Artemis Slave Replication Use SSL

在 Artemis 中,当使用复制来保持 master/slave 对同步时,数据将使用 'connection'.

复制到从站

我想确保此复制连接已加密。我怀疑这是通过在 broker.xmlconnectors 部分使用 SSL 完成的。然而,通过 guides/official 文档挖掘并没有明确说明这是如何完成的。是的,我可以慢慢浏览源代码,玩弄设置,尝试嗅探流量,只是觉得在这里提问可能更容易一些。

让我们假设我现在只有一对 master/slave(我知道这对裂脑不好,但让我们暂时保持简单)并且将使用静态连接列表,因为我的数据中不允许 UDP center 我有以下设置。

<connectors xmlns="urn:activemq:core">
    <connector name="master">
        tcp://master:61616?sslEnabled=true;keyStorePath=/d1/usr/dltuser/keystore/qcsp6ab2001.jks;keyStorePassword=1q2w3e4r;needClientAuth=true;trustStorePath=/d1/usr/dltuser/keystore/qcsp6ab2001_trust.jks;truststorepassword=1q2w3e4r
    </connector>
    <connector name="slave">
        tcp://slave:61616?sslEnabled=true;keyStorePath=/d1/usr/dltuser/keystore/qcsp6ab2001.jks;keyStorePassword=1q2w3e4r;needClientAuth=true;trustStorePath=/d1/usr/dltuser/keystore/qcsp6ab2001_trust.jks;truststorepassword=1q2w3e4r
    </connector>
</connectors>
<cluster-connections>
    <cluster-connection name="amq-cluster">
        <connector-ref>master</connector-ref>
        <retry-interval>500</retry-interval>
        <retry-interval-multiplier>1.1</retry-interval-multiplier>
        <max-retry-interval>5000</max-retry-interval>
        <initial-connect-attempts>-1</initial-connect-attempts>
        <reconnect-attempts>-1</reconnect-attempts>
        <forward-when-no-consumers>false</forward-when-no-consumers>
        <max-hops>1</max-hops>
        <static-connectors>
            <connector-ref>master</connector-ref>
            <connector-ref>slave</connector-ref>
        </static-connectors>
    </cluster-connection>
</cluster-connections>
<ha-policy>
    <replication>
        <master>
            <check-for-live-server>true</check-for-live-server>
            <!-- what master/slave group is this broker part of, master and slave must match -->
            <group-name>nft-group-1</group-name>
            <!-- does the broker initiate a quorum vote if connection to slave fails -->
            <vote-on-replication-failure>true</vote-on-replication-failure>
            <!-- how many votes should backup intiate when requesting a quorum?-->
            <vote-retries>5</vote-retries>
            <!-- how long should the broker wait between vote retries -->
            <vote-retry-wait>5000</vote-retry-wait>
            <vote-on-replication-failure>true</vote-on-replication-failure>
            <cluster-name>amq-cluster</cluster-name>
        </master>
    </replication>
</ha-policy>

根据我的理解,在形成主从对时将使用连接器,然后将使用连接器部分的配置通过 SSL 完成复制,是这种情况吗?

From my understanding the connectors will be used when forming the master slave pairs and then the replication will be done via SSL using the configuration from connectors section is this the case?

是的,是这样。