You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Nico74 <nb...@nbconseil.com> on 2008/03/21 17:32:22 UTC

JMS recoveryInterval seem not work

Hi,

I have a jms queue which store a system error messages. The consumer is a
bean which listen for messages and send an email. All work fine but when an
error occured in the bean, the message is resend but with no timeout. I set
recoveryInterval but it seem have no influence. Anyone have an idea ?



JMS QUEUE
-------------

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
	xmlns:flpos="http://amix-tpv.com/flexpos"
	xmlns:amqpool="http://jencks.org/amqpool/2.0"
	xmlns:amq="http://activemq.org/config/1.0">


	<jms:provider service="flpos:BackOfficeImportQueue"
		endpoint="jmsQueueProvider"
		destinationName="queue/flexPosBackOfficeData"
		connectionFactory="#connectionFactory" />

	<!-- END SNIPPET: provider -->


	<jms:consumer service="flpos:BackOfficeImportQueue"
		endpoint="jmsQueueConsumer"
		targetService="flpos:BackOfficeMailService" targetEndpoint="mail"
		synchronous="true" 
		transacted="jms" 
		
		recoveryInterval="40000"
		destinationName="queue/flexPosBackOfficeData"
		connectionFactory="#connectionFactory" />


	<amq:connectionFactory id="connectionFactory"
	
brokerURL="tcp://localhost:61616?jms.redeliveryPolicy.useExponentialBackOff=true&amp;jms.redeliveryPolicy.initialRedeliveryDelay=20000L&amp;jms.redeliveryPolicy.maximumRedeliveries=10"
/>

</beans>



MAIL BEAN
-------------

  /**
     * onMessageExchange : entry point for delivered messages
     */
    public void onMessageExchange(MessageExchange exchange) throws
MessagingException
    {
          ...

        try
        {
              .....
        } catch (Exception e)
        {
            throw new MessagingException(e);
        }
-- 
View this message in context: http://www.nabble.com/JMS-recoveryInterval-seem-not-work-tp16201974s12049p16201974.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: JMS recoveryInterval seem not work

Posted by Nico74 <nb...@nbconseil.com>.
Hi Bruce,

Sorry for the delay and thanks for tour response. I use activemq in another
project and I configure recovery policy to specify how the broker resend
rollback messages. How can I do the same think in activemix ?

Thanks,

Nicolas


-- 
View this message in context: http://www.nabble.com/Re%3A-JMS-recoveryInterval-seem-not-work-tp16317478p16467534.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: JMS recoveryInterval seem not work

Posted by Nico74 <nb...@nbconseil.com>.


Nico74 wrote:
> 
> 
> Hi Bruce,
> 
> Sorry for the delay and thanks for tour response. I use activemq in
> another project and I configure recovery policy to specify how the broker
> resend rollback messages. How can I do the same think in activemix ?
> 
> Thanks,
> 
> Nicolas
> 
> 
> 
> 

On Fri, Mar 21, 2008 at 10:32 AM, Nico74 <nb...@nbconseil.com> wrote:
>
>  Hi,
>
>  I have a jms queue which store a system error messages. The consumer is a
>  bean which listen for messages and send an email. All work fine but when
> an
>  error occured in the bean, the message is resend but with no timeout. I
> set
>  recoveryInterval but it seem have no influence. Anyone have an idea ?

That's not what recoveryInterval is for. You mention a timeout above,
maybe you need to set the message expiration.

What is it that you're trying to achieve exactly?

Bruce
-- 
perl -e 'print
unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/


-- 
View this message in context: http://www.nabble.com/Re%3A-JMS-recoveryInterval-seem-not-work-tp16317478p16467360.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: JMS recoveryInterval seem not work

Posted by Nico74 <nb...@nbconseil.com>.


Nico74 wrote:
> 
> 
> Hi Bruce,
> 
> Sorry for the delay and thanks for tour response. I use activemq in
> another project and I configure recovery policy to specify how the broker
> resend rollback messages. How can I do the same think in activemix ?
> 
> Thanks,
> 
> Nicolas
> 
> 
> 
> 

On Fri, Mar 21, 2008 at 10:32 AM, Nico74 <nb...@nbconseil.com> wrote:
>
>  Hi,
>
>  I have a jms queue which store a system error messages. The consumer is a
>  bean which listen for messages and send an email. All work fine but when
> an
>  error occured in the bean, the message is resend but with no timeout. I
> set
>  recoveryInterval but it seem have no influence. Anyone have an idea ?

That's not what recoveryInterval is for. You mention a timeout above,
maybe you need to set the message expiration.

What is it that you're trying to achieve exactly?

Bruce
-- 
perl -e 'print
unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/


-- 
View this message in context: http://www.nabble.com/Re%3A-JMS-recoveryInterval-seem-not-work-tp16317478p16467360.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: JMS recoveryInterval seem not work

Posted by Bruce Snyder <br...@gmail.com>.
On Fri, Mar 21, 2008 at 10:32 AM, Nico74 <nb...@nbconseil.com> wrote:
>
>  Hi,
>
>  I have a jms queue which store a system error messages. The consumer is a
>  bean which listen for messages and send an email. All work fine but when an
>  error occured in the bean, the message is resend but with no timeout. I set
>  recoveryInterval but it seem have no influence. Anyone have an idea ?

That's not what recoveryInterval is for. You mention a timeout above,
maybe you need to set the message expiration.

What is it that you're trying to achieve exactly?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/