我定义了以下 JMS 消费者代理服务:
<proxy xmlns="http://ws.apache.org/ns/synapse" name="DefiDealerProxy" transports="jms" statistics="enable" trace="enable" startOnLoad="true">
<target>
<inSequence>
<property name="OUT_ONLY" value="true" scope="default" type="STRING" />
</inSequence>
</target>
<parameter name="transport.jms.ConnectionFactory">myTopicConnectionFactory</parameter>
<parameter name="transport.jms.Destination">activemq.topic.sync</parameter>
<parameter name="transport.jms.DestinationType">topic</parameter>
<parameter name="transport.jms.MessageSelector">ACTION = 'Save' AND ENTITY = 'dealer'</parameter>
<parameter name="transport.jms.SubscriptionDurable">true</parameter>
<parameter name="transport.jms.DurableSubscriberName">My Subscriber</parameter>
<parameter name="transport.jms.ContentType">
<rules>
<jmsProperty>contentType</jmsProperty>
<default>application/xml</default>
</rules>
</parameter>
</proxy>
这是我的axis2.xml配置:
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">failover:tcp://localhost:61616</parameter>
<parameter name="transport.jms.UserName">user</parameter>
<parameter name="transport.jms.Password">password</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
<parameter name="transport.jms.DurableSubscriberClientID" locked="false">myHomePC</parameter>
</parameter>
<parameter name="myQueueConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">failover:tcp://localhost:61616</parameter>
<parameter name="transport.jms.UserName">user</parameter>
<parameter name="transport.jms.Password">password</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.DurableSubscriberClientID" locked="false">myHomePC</parameter>
</parameter>
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">failover:tcp://localhost:61616</parameter>
<parameter name="transport.jms.UserName">user</parameter>
<parameter name="transport.jms.Password">password</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.DurableSubscriberClientID" locked="false">myHomePC</parameter>
</parameter>
</transportReceiver>
一旦我在源模式下创建代理服务并保存它。它成功连接到 ActiveMQ 代理并按预期接收消息。但是,我无法在设计或源代码模式下再次编辑代理服务,因为单击“编辑”按钮后 UI 会完全改变。我在 ESB 4.6 和 4.7 中遇到过这个问题。有没有人遇到过这个问题?任何帮助将不胜感激。