我已经完成了消息存储和转发过程所需的所有过程安装了 activeMQ 5.5.1 并在 WSO2eSb 中复制了必要的 Jars 更改了 AXIS2 文件配置也像这样
<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">tcp://localhost:61616</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</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">tcp://localhost:61616</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</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">tcp://localhost:61616</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
</transportReceiver>
INFO - JMSSender JMS Sender 已启动 [2013-07-23 17:02:18,752] INFO - JMSSender JMS Transport Sender 已初始化...之后我创建了 JMS MESSAGE STORE <
messageStore name="faisal" class="org.wso2.carbon.message.store.persistence.jms.JMSMessageStore" xmlns="http://ws.apache.org/ns/synapse">
<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
<parameter name="store.jms.destination">transport.jms.ConnectionFactoryJNDIName</parameter>
<parameter name="store.jms.JMSSpecVersion">1.1</parameter>
<parameter name="store.jms.cache.connection">false</parameter>
</messageStore>
并添加计划的消息转发处理器
<messageProcessor name="process5" class="org.apache.synapse.message.processors.forward.ScheduledMessageForwardingProcessor" messageStore="faisal" xmlns="http://ws.apache.org/ns/synapse">
<parameter name="interval">1000</parameter>
<parameter name="max.delivery.attempts">10</parameter>
<parameter name="message.processor.reply.sequence">Mail_Seq</parameter>
</messageProcessor>
和我这样的代理服务配置
<proxy xmlns="http://ws.apache.org/ns/synapse" name="Message" transports="https,http,jms" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<property name="faisal" value="faisal" scope="default" type="STRING"/>
<store messageStore="faisal"/>
<log level="full"/>
</inSequence>
<outSequence>
<log level="full"/>
</outSequence>
</target>
<description></description>
</proxy>
将消息存储在消息存储中但转发是错误的 IF 端点无法正常工作,即使消息正在 WSO2esb 中处理其丢失的消息,它也会给出此消息
[2013-07-23 17:02:18,817] WARN - ForwardingJob Property target.endpoint not found in the message context , Hence removing the message
[2013-07-23 17:02:18,869] WARN - ForwardingJob Property target.endpoint not found in the message context , Hence removing the message
[2013-07-23 17:08:07,419] WARN - JMSMessageStore Consumer Receiving time out is not passed in, Setting to default value of 60 secs