Jboss 如何使用标签<;地址>;在<;群集连接>;在standalone.xml中?

Jboss 如何使用标签<;地址>;在<;群集连接>;在standalone.xml中?,jboss,jms,wildfly-8,Jboss,Jms,Wildfly 8,我正在尝试在wildfly中配置JMS集群。 我有队列要处理,但我在中读到一个有趣的属性: .address:每个群集连接仅适用于发送到以该值开头的地址的邮件。注意:这不使用通配符匹配 据我所知,这允许我为不同的队列创建不同的集群。每个集群将只“侦听”发送到给定地址的消息,该地址以address属性中定义的值开头。 它引起了我的注意,我正在努力让它工作,所以我有两个队列: <jms-queue name="ClusteredQueue"> <entry name="ja

我正在尝试在wildfly中配置JMS集群。 我有队列要处理,但我在中读到一个有趣的属性:

.address:每个群集连接仅适用于发送到以该值开头的地址的邮件。注意:这不使用通配符匹配

据我所知,这允许我为不同的队列创建不同的集群。每个集群将只“侦听”发送到给定地址的消息,该地址以address属性中定义的值开头。 它引起了我的注意,我正在努力让它工作,所以我有两个队列:

<jms-queue name="ClusteredQueue">
    <entry name="java:/jms/queue/ClusteredQueue"/>
    <entry name="jms/queue/ClusteredQueue"/>
</jms-queue>
<jms-queue name="SecondClusteredQueue">
    <entry name="java:/jms/queue/SecondClusteredQueue"/>
    <entry name="queue/SecondClusteredQueue"/>
</jms-queue>
My Receivers(MDB)具有以下注释:

//ClusteredQueue的接收器 @消息驱动(激活配置={ @ActivationConfigProperty(propertyName=“destinationLookup”,propertyValue=“java:/jms/queue/ClusteredQueue”), @ActivationConfigProperty(propertyName=“destinationType”,propertyValue=“javax.jms.Queue”)} //SecondClusteredQueue的接收器 @消息驱动(激活配置={ @ActivationConfigProperty(propertyName=“destinationLookup”,propertyValue=“java:/jms/queue/SecondClusteredQueue”), @ActivationConfigProperty(propertyName=“destinationType”,propertyValue=“javax.jms.Queue”)}

<cluster-connections>
    <cluster-connection name="my-cluster">
        <address>jms</address>
        <connector-ref>http-connector</connector-ref>
        <discovery-group-ref discovery-group-name="dg-group1"/>
    </cluster-connection>
</cluster-connections>
@Resource(mappedName = "java:/jms/queue/ClusteredQueue")
private transient Queue myQueue;

@Resource(mappedName = "java:/queue/SecondClusteredQueue")
private transient Queue myNewQueue;