0

我有三个应用程序应该与bandwitch 限制超过100,000 个用户一起通信。

我们决定使用 WSO2MB 和 WSO2ESB 在应用程序之间发布消息。

问题是 target.endpoint 没有收到消息,我不知道为什么。

  <api xmlns="http://ws.apache.org/ns/synapse" name="School" context="/schools">
   <resource methods="POST" url-mapping="/" faultSequence="fault">
      <inSequence>
         <log level="custom">
            <property name="Message Flow" value="--- Schools POST ---"></property>
         </log>
         <property name="REST_URL_POSTFIX" scope="axis2" action="remove"></property>
         <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"></property>
         <property name="OUT_ONLY" value="true"></property>
         <property name="target.endpoint" value="Test.Endpoint"></property>
         <log level="custom">
            <property name="Message Flow" value="--- Schools POST ---"></property>
         </log>
         <store messageStore="JMSMS"></store>
         <log level="full"></log>
      </inSequence>
   </resource>
</api>

消息存储

<messageStore name="JMSMS" class="org.apache.synapse.message.store.impl.jms.JmsStore" xmlns="http://ws.apache.org/ns/synapse">
   <parameter name="java.naming.factory.initial">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
   <parameter name="java.naming.provider.url">repository/conf/jndi.properties</parameter>
   <parameter name="store.jms.destination">JMSMS</parameter>
   <parameter name="store.jms.connection.factory">QueueConnectionFactory</parameter>
   <parameter name="store.jms.username">admin</parameter>
   <parameter name="store.jms.password">admin</parameter>
   <parameter name="store.jms.JMSSpecVersion">1.1</parameter>
</messageStore>

消息处理器

<messageProcessor name="JMSMS" class="org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor" targetEndpoint="Test.Endpoint" messageStore="JMSMS" xmlns="http://ws.apache.org/ns/synapse">
   <parameter name="interval">1000</parameter>
   <parameter name="client.retry.interval">1000</parameter>
   <parameter name="is.active">true</parameter>
</messageProcessor>

Jndi.properties

connectionfactory.QueueConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5673'
connectionfactory.TopicConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5673'

queue.JMSMS=JMSMS

编辑:
Test.Endpoint

    <?xml version="1.0" encoding="UTF-8"?>
<endpoint xmlns="http://ws.apache.org/ns/synapse" name="Test.Endpoint">
   <http method="post" uri-template="http://10.0.2.2:8000/super/test"/>
</endpoint>
4

1 回答 1

0

您已经定义了以下属性。但是您尚未在突触中定义端点。

 <property name="target.endpoint" value="Test.Endpoint"></property>

如果您已将值定义为 Test.Endpoint ,则应该定义一个端点。

例如,

  <endpoint name="Test.Endpoint">
      <address uri="http://127.0.0.1:9000/services/SimpleStockQuoteService"/>
   </endpoint>

请查看我们的示例文档:https ://docs.wso2.com/display/ESB481/Sample+702%3A+Introduction+to+Message+Forwarding+Processor

于 2015-07-21T09:10:41.227 回答