简体   繁体   English

wso2mb持久主题订阅在使用JMS端点和JMS代理服务的集成中不起作用

[英]wso2mb durable topic subscription doesn't work in Integration Using JMS Endpoints and JMS Proxy Services

I'm trying to integrate wso2mb with wso2esb and use durable topics to persist messages in queue when the subscriber is not active and recover them in future. 我正在尝试将wso2mb与wso2esb集成在一起,并使用持久性主题在订户不活动时将消息持久保存在队列中,并在将来进行恢复。 I used first method (Integration Using JMS Endpoints and JMS Proxy Services ) of integration in wso2mb documentation. 我在wso2mb文档中使用了集成的第一种方法(使用JMS端点和JMS代理服务进行集成)。 Here is my publisher proxy : 这是我的发布商代理:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
   name="InTopicProxy"
   transports="https,http"
   statistics="disable"
   trace="disable"
   startOnLoad="true">
  <target>
  <inSequence>
     <property name="OUT_ONLY" value="true"/>
     <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
     <send>
        <endpoint>
           <address uri="jms:/MyDurbleTopic?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&amp;java.naming.provider.url=repository/conf/jndi.properties&amp;transport.jms.DestinationType=topic"/>
        </endpoint>
     </send>
  </inSequence>
  </target>
  <description/>
  </proxy>\

and I used this answer to create consumer proxy and a durable topic and here is my subscriber proxy: 我用这个答案来创建消费者代理和一个持久的主题,这是我的订户代理:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
   name="TopicSubProxy"
   transports="jms"
   statistics="disable"
   trace="disable"
   startOnLoad="true">
   <target>
  <inSequence>
     <property name="OUT_ONLY" value="true"/>
     <log level="custom">
        <property name="STATE" value="dispatch message..."/>
     </log>
     <send>
        <endpoint>
           <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
        </endpoint>
     </send>
  </inSequence>
  <outSequence>
     <send/>
  </outSequence>
  </target>
  <parameter name="transport.jms.ContentType">
  <rules>
     <jmsProperty>contentType</jmsProperty>
     <default>text/xml</default>
  </rules>
  </parameter>
    <parameter name="transport.jms.ConnectionFactory">myTopicConnectionFactory</parameter>
   <parameter name="transport.jms.DestinationType">topic</parameter>
   <parameter name="transport.jms.SubscriptionDurable">true</parameter>
   <parameter name="transport.jms.Destination">MyDurbleTopic</parameter>
   <parameter name="transport.jms.DurableSubscriberName">subId-x</parameter>
   <parameter name="transport.jms.CacheLevel">consumer</parameter>
   <parameter name="transport.jms.DurableSubscriberClientID">subId-x</parameter>
   <description/>
</proxy>

I can call publisher proxy using SoapUI and the subscriber proxy will consume the messages and sends them to SimpleStockQuoteService (wso2esb server sample) but the problem is when I shut down the server, messages accumulate in topic queue and by the time I start server again, the subscriber doesn't consume and doesn't send accumulated messages to server and I wonder when I use wso2mb without wso2esb and JMS client subscriber with java code, durable topic works perfectly and consumes messages after starting the server. 我可以使用SoapUI调用发布者代理,订阅者代理将使用这些消息并将其发送到SimpleStockQuoteService(wso2esb服务器示例),但是问题是当我关闭服务器时,消息在主题队列中累积,并且在我再次启动服务器时,订阅服务器不会消耗资源,也不会向服务器发送累积的消息,我想知道当我在没有wso2esb的情况下使用wso2mb以及带有Java代码的JMS客户端订阅服务器时,持久性主题可以完美地工作并且在启动服务器之后消耗消息。 any ideas? 有任何想法吗?

使用此链接的调解序列和错误序列解决的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM