0

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. I used first method (Integration Using JMS Endpoints and JMS Proxy Services ) of integration in wso2mb documentation. 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. any ideas?

Community
  • 1
  • 1
  • Are you shutting down ESB server ? – Indika Sampath Jun 20 '16 at 02:14
  • No, I shut down the destination server like SimpleQuoteStock, and send messages to topic, after starting the server again, I want messages to be send to the server, but nothing happens, msgs just accumulate in topic. – Farzam Vatanzadeh Jun 21 '16 at 02:43
  • problem solved whit this link, Thanks a lot http://wso2.com/library/other/2015/12/article-how-to-achieve-delivery-reliability-with-dead-letter-channel-pattern-part-2/ – Farzam Vatanzadeh Jun 21 '16 at 06:23

1 Answers1

0

Problem solved with mediation sequence and error sequences using this link