【问题标题】:jboss fuse 6.2.1 mq in fabricjboss fuse 6.2.1 mq in fabric
【发布时间】:2016-05-05 20:31:52
【问题描述】:

我在带有两个子容器的结构模式下的 Linux 服务器上安装了 jboss fuse 6.2.1。我用这个命令创建了 mq

fabric:mq-create --group mur --assign-container risng1,risng2 --port tcp=61617 mur-broker
MQ profile mq-broker-mur.mur-broker ready

但我希望传输协议将配置为静态端口 61617,但它是动态的。

在 fuse 6.1 中我修改了基本模板 broker.xml

 <transportConnector name="openwire" uri="tcp://0.0.0.0:${bindPort}"/>

绑定端口在配置文件的属性中配置。在保险丝 6.2 中不起作用。我的问题是如何在 jms 代理上以结构模式配置静态端口?

我发现已关闭问题https://issues.jboss.org/browse/FABRIC-1237

【问题讨论】:

    标签: linux jboss activemq jbossfuse fabric8


    【解决方案1】:

    解决了,

    您可以在个人资料中使用自定义模板

        <beans
      xmlns="http://www.springframework.org/schema/beans"
      xmlns:amq="http://activemq.apache.org/schema/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
    
        <!-- Allows us to use system properties and fabric as variables in this configuration file -->
        <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
            <property name="properties">
                <bean class="io.fabric8.mq.fabric.ConfigurationProperties"/>
            </property>
        </bean>
    
        <broker xmlns="http://activemq.apache.org/schema/core" brokerName="${broker-name}" dataDirectory="${data}" start="false" restartAllowed="false">
    
            <destinationPolicy>
                <policyMap>
                  <policyEntries>
                    <policyEntry topic=">" producerFlowControl="true">
                      <pendingMessageLimitStrategy>
                        <constantPendingMessageLimitStrategy limit="1000"/>
                      </pendingMessageLimitStrategy>
                    </policyEntry>
                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
                    </policyEntry>
                  </policyEntries>
                </policyMap>
            </destinationPolicy>
    
            <managementContext>
                <managementContext createConnector="false"/>
            </managementContext>
    
            <persistenceAdapter>
                <kahaDB directory="${data}/kahadb"/>
            </persistenceAdapter>
    
            <plugins>
                <jaasAuthenticationPlugin configuration="karaf" />
            </plugins>
    
            <systemUsage>
                <systemUsage>
                    <memoryUsage>
                        <memoryUsage percentOfJvmHeap="70"/>
                    </memoryUsage>
                    <storeUsage>
                        <storeUsage limit="500 mb"/>
                    </storeUsage>
                    <tempUsage>
                        <tempUsage limit="500 mb"/>
                    </tempUsage>
                </systemUsage>
            </systemUsage>
    
            <transportConnectors>
                <transportConnector name="openwire" uri="tcp://${bindAddress}:61617"/>
            </transportConnectors>
        </broker>
    
    </beans>
    

    和编辑属性

        group = mur
    broker-name = mur-broker
    connectors=openwire
    kind = MasterSlave
    data = ${runtime.data}mur-broker
    config=profile\:broker-mur.xml
    config.checksum=${checksum:profile\:broker-mur.xml}
    standby.pool=default
    bindAddress=0.0.0.0
    bindPort=61617
    

    【讨论】:

      猜你喜欢
      • 2023-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-14
      • 1970-01-01
      相关资源
      最近更新 更多