I have made a simple proxy service which is listening on a queue on Message Broker. I have successfully implemented the JMS Transaction that if service encounters any error the message is successfully rolled-back. By default the number of maximum re deliveries are 10, after that the message is delivered to dead letter channel.
Problem:
I want to be able to change following two configurations:
1) Maximum number of re-deliveries
2) Time Between Each Redelivery Attempt
Where will i do these configurations, in my {ESB_HOME}/repository/conf/axis2/axis2.xml file or in my Message Broker.
Following is my current configurations of axis2.xml
<!--Uncomment this and configure as appropriate for JMS transport support with WSO2 MB 2.x.x -->
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.SessionTransacted">true</parameter>
<parameter name="transport.jms.SessionAcknowledgement" locked="true">CLIENT_ACKNOWLEDGE</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.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.SessionTransacted">true</parameter>
<parameter name="transport.jms.SessionAcknowledgement" locked="true">CLIENT_ACKNOWLEDGE</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.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.SessionTransacted">true</parameter>
<parameter name="transport.jms.SessionAcknowledgement" locked="true">CLIENT_ACKNOWLEDGE</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
</transportReceiver>
Note: I am using WSO2 4.8.1 and WSO2 Message Broker 2.2.0.
What i find:
I have found the solution to first value that is Maximum number of re-deliveries, we can configure this value by editing following tag in {$MB_HOME}/repository/conf/advanced/andes-config.xml file.
<maximumNumberOfMessageDeliveryAttempts>10</maximumNumberOfMessageDeliveryAttempts>
Unable to find: What i am unable to find is a configuration by which i can change the delay Time between each redelivery attempt. Previously i was using ActiveMQ as the message broker in which we can add following paramter to our {$ESB_HOME}/repository/conf/axis2/axis2.xml file.
<parameter name="redeliveryPolicy.redeliveryDelay" locked="true">1200000</parameter>
I want the same thing in WSO2 Message Broker but i am unable to find any configuration. I tried the above mentioned parameter but it won't work for WSO2 MB.