ActiveMQ4.0.1 + Jencks 1.2 Redelivery Policy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveMQ4.0.1 + Jencks 1.2 Redelivery Policy

venu-2
I am trying to figure out how i can set the redelivery options to redeliver the messages. I am using ActiveMQ 4.0.1 with Jencks 1.2. Here is the snippet of code i am using to set the re delivery options in the Jencks configuration. I am doing the transaction rollback when there is any exception but i don't see message is being redelivered.

Is anyone able to make the redelivery work using ActiveMQ 4.0.1 with Jencks?

<bean id="jmsResourceAdapter" class="org.apache.activemq.ra.ActiveMQResourceAdapter">
       <property name="serverUrl">
         <value>@@transport.url@@</value>
       </property>     
       <property name="initialRedeliveryDelay">
         <value>30000</value>
       </property>
       <property name="maximumRedeliveries">
         <value>5</value>
       </property>   
       <property name="redeliveryUseExponentialBackOff">
         <value>true</value>
       </property>
       <property name="redeliveryBackOffMultiplier">
         <value>2</value>
       </property> 
               
   </bean>

Thanks,
Venu.
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ4.0.1 + Jencks 1.2 Redelivery Policy

James Strachan-2
Could you submit a JUnit test case that demonstrates your issue please?
http://incubator.apache.org/activemq/support.html

On 8/8/06, venu <[hidden email]> wrote:

>
> I am trying to figure out how i can set the redelivery options to redeliver
> the messages. I am using ActiveMQ 4.0.1 with Jencks 1.2. Here is the snippet
> of code i am using to set the re delivery options in the Jencks
> configuration. I am doing the transaction rollback when there is any
> exception but i don't see message is being redelivered.
>
> Is anyone able to make the redelivery work using ActiveMQ 4.0.1 with Jencks?
>
> <bean id="jmsResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter">
>        <property name="serverUrl">
>          <value>@@transport.url@@</value>
>        </property>
>        <property name="initialRedeliveryDelay">
>          <value>30000</value>
>        </property>
>        <property name="maximumRedeliveries">
>          <value>5</value>
>        </property>
>        <property name="redeliveryUseExponentialBackOff">
>          <value>true</value>
>        </property>
>        <property name="redeliveryBackOffMultiplier">
>          <value>2</value>
>        </property>
>
>    </bean>
>
> Thanks,
> Venu.
> --
> View this message in context: http://www.nabble.com/ActiveMQ4.0.1-%2B-Jencks-1.2-Redelivery-Policy-tf2074242.html#a5711799
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ4.0.1 + Jencks 1.2 Redelivery Policy

venu-2
As i am making changes in my existing application(upgrading form 3.2.1 to 4.0.1), i didn't come up with JUnit test case but here i am posting the configuration i am using.

I tested the re delivery with the example tools came with ActiveMQ 4.0.1 and redelivery works fine but it doesn't work with Jencks. Am i misisng anything?

Broker:
--------
<beans xmlns="http://activemq.org/config/1.0">
 
  <broker brokerName="cluster" useJmx="true">
       
        <persistenceAdapter>
            <journaledJDBC dataSource="#mssqlserver-ds"/>                           
        </persistenceAdapter>
       
        <transportConnectors>
            <transportConnector uri="tcp://localhost:61616"/>
        </transportConnectors>
   
  </broker> 
  <bean id="mssqlserver-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver"/>
        <property name="url" value=""/>
        <property name="username" value="user"/>
        <property name="password" value="password"/>
        <property name="initialSize" value="5"/> 
  </bean>
   
</beans>

Jencks:
----------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
 

  <bean id="jencks" class="org.jencks.JCAContainer">     
  <property name="bootstrapContext"> 
                <bean class="org.jencks.factory.BootstrapContextFactoryBean">
                    <property name="threadPoolSize" value="@@threadpool.size@@"/>
                </bean>
    </property>       
  <property name="resourceAdapter">
           <ref local="jmsResourceAdapter"/>
    </property>       
   </bean>
 
   <bean id="emailConnector" class="org.jencks.JCAConnector">
        <property name="jcaContainer" ref="jencks"/> 
    <property name="activationSpec"> 
                <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
                   <property name="destination" value="EmailQueue"/>
                   <property name="destinationType" value="javax.jms.Queue"/>
                </bean>
        </property>       
        <property name="transactionManager" ref="userTransaction"/>
        <property name="ref" value="emailConsumer"/>
   </bean>
   
 

   <bean id="jmsResourceAdapter" class="org.apache.activemq.ra.ActiveMQResourceAdapter">
       <property name="serverUrl">
         <value>@@transport.url@@</value>
       </property>     
       <property name="initialRedeliveryDelay">
         <value>30000</value>
       </property>
       <property name="maximumRedeliveries">
         <value>5</value>
       </property>   
       <property name="redeliveryUseExponentialBackOff">
         <value>true</value>
       </property>
       <property name="redeliveryBackOffMultiplier">
         <value>2</value>
       </property> 
               
   </bean>
   
      
   <bean id="transactionContextManager" class="org.jencks.factory.TransactionContextManagerFactoryBean"/>   
   <bean id="userTransaction" class="org.jencks.factory.GeronimoTransactionManagerFactoryBean"/>
   <bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
        <property name="userTransaction" ref="userTransaction" />
   </bean>
 
   <bean id="emailConsumer" class="........">   
   </bean>
   
      
 
</beans>