You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Cristian Botiza <Cr...@endava.com> on 2010/03/29 12:21:34 UTC

Message expiration

Hi all,

By reading the JavaDoc I wasn't able to figure out exactly what setJMSExpiration(long) does.

If I use a value of 60000 for example (IN THE SENDER CODE) does that mean that the message will be deleted from the store if not consumed in aproximately 1 minute? Is there any guarantee for this behavior?

If not, is there a way I can enforce this?

thank you

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the EndavaIT Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.

Endava Limited is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava Limited is the Endava group holding company and does not provide any services to clients. Each of Endava Limited and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. Please refer to the “Legal” section on our website for a list of legal entities.

RE: Message expiration

Posted by Cristian Botiza <Cr...@endava.com>.
Thanks for that.

However I'm using AMQ 4.1.2, embedded in Geronimo. Can't upgrade to 5.1.3 unfortunately.
When browsing the message store in Geronimo's console I see EXPIRATION=0 for that message, and the AMQ logs show that it tries to delete message whose EXPIRATION value is <>0

Does this mean that upon receipt of the message the EXPIRATION header is cleared by the provider? Shoul I change Connection Factory settings in the Geronimo deployment plans?

Thank you

________________________________________
From: Gary Tully [gary.tully@gmail.com]
Sent: 29 March 2010 13:39
To: users@activemq.apache.org
Subject: Re: Message expiration

yes, it is specified in milliseconds and with 5.3.1. for queues, the message
will be automatically expired, independent of consumer activity.

On 29 March 2010 11:21, Cristian Botiza <Cr...@endava.com> wrote:

> Hi all,
>
> By reading the JavaDoc I wasn't able to figure out exactly what
> setJMSExpiration(long) does.
>
> If I use a value of 60000 for example (IN THE SENDER CODE) does that mean
> that the message will be deleted from the store if not consumed in
> aproximately 1 minute? Is there any guarantee for this behavior?
>
> If not, is there a way I can enforce this?
>
> thank you
>
> The information in this email is confidential and may be legally
> privileged. It is intended solely for the addressee. Any opinions expressed
> are mine and do not necessarily represent the opinions of the Company.
> Emails are susceptible to interference. If you are not the intended
> recipient, any disclosure, copying, distribution or any action taken or
> omitted to be taken in reliance on it, is strictly prohibited and may be
> unlawful. If you have received this message in error, do not open any
> attachments but please notify the EndavaIT Service Desk on (+44 (0)870 423
> 0187), and delete this message from your system. The sender accepts no
> responsibility for information, errors or omissions in this email, or for
> its use or misuse, or for any act committed or omitted in connection with
> this communication. If in doubt, please verify the authenticity of the
> contents with the sender. Please rely on your own virus checkers as no
> responsibility is taken by the sender for any damage rising out of any bug
> or virus infection.
>
> Endava Limited is a company registered in England under company number
> 5722669 whose registered office is at 125 Old Broad Street, London, EC2N
> 1AR, United Kingdom. Endava Limited is the Endava group holding company and
> does not provide any services to clients. Each of Endava Limited and its
> subsidiaries is a separate legal entity and has no liability for another
> such entity's acts or omissions. Please refer to the “Legal” section on our
> website for a list of legal entities.
>



--
http://blog.garytully.com

Open Source Integration
http://fusesource.com

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the EndavaIT Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.

Endava Limited is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava Limited is the Endava group holding company and does not provide any services to clients. Each of Endava Limited and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. Please refer to the “Legal” section on our website for a list of legal entities.

RE: Message expiration

Posted by Cristian Botiza <Cr...@endava.com>.
Ok, I figured it out.
Looks like we shouldn't use setJMSExpiration() but setTimeToLive() in the Producer. Alternative is to use
the overloaded send() method and specify the TTL there.

AMQ logs now show clearly the message was deleted from the (Derby) store. And the EXPIRATION value
is shown properly in the Geronimo console.

Thanks
Cristian

________________________________________
From: Gary Tully [gary.tully@gmail.com]
Sent: 29 March 2010 13:39
To: users@activemq.apache.org
Subject: Re: Message expiration

yes, it is specified in milliseconds and with 5.3.1. for queues, the message
will be automatically expired, independent of consumer activity.

On 29 March 2010 11:21, Cristian Botiza <Cr...@endava.com> wrote:

> Hi all,
>
> By reading the JavaDoc I wasn't able to figure out exactly what
> setJMSExpiration(long) does.
>
> If I use a value of 60000 for example (IN THE SENDER CODE) does that mean
> that the message will be deleted from the store if not consumed in
> aproximately 1 minute? Is there any guarantee for this behavior?
>
> If not, is there a way I can enforce this?
>
> thank you
>
> The information in this email is confidential and may be legally
> privileged. It is intended solely for the addressee. Any opinions expressed
> are mine and do not necessarily represent the opinions of the Company.
> Emails are susceptible to interference. If you are not the intended
> recipient, any disclosure, copying, distribution or any action taken or
> omitted to be taken in reliance on it, is strictly prohibited and may be
> unlawful. If you have received this message in error, do not open any
> attachments but please notify the EndavaIT Service Desk on (+44 (0)870 423
> 0187), and delete this message from your system. The sender accepts no
> responsibility for information, errors or omissions in this email, or for
> its use or misuse, or for any act committed or omitted in connection with
> this communication. If in doubt, please verify the authenticity of the
> contents with the sender. Please rely on your own virus checkers as no
> responsibility is taken by the sender for any damage rising out of any bug
> or virus infection.
>
> Endava Limited is a company registered in England under company number
> 5722669 whose registered office is at 125 Old Broad Street, London, EC2N
> 1AR, United Kingdom. Endava Limited is the Endava group holding company and
> does not provide any services to clients. Each of Endava Limited and its
> subsidiaries is a separate legal entity and has no liability for another
> such entity's acts or omissions. Please refer to the “Legal” section on our
> website for a list of legal entities.
>



--
http://blog.garytully.com

Open Source Integration
http://fusesource.com

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the EndavaIT Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.

Endava Limited is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava Limited is the Endava group holding company and does not provide any services to clients. Each of Endava Limited and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. Please refer to the “Legal” section on our website for a list of legal entities.

Re: Message expiration

Posted by Gary Tully <ga...@gmail.com>.
yes, it is specified in milliseconds and with 5.3.1. for queues, the message
will be automatically expired, independent of consumer activity.

On 29 March 2010 11:21, Cristian Botiza <Cr...@endava.com> wrote:

> Hi all,
>
> By reading the JavaDoc I wasn't able to figure out exactly what
> setJMSExpiration(long) does.
>
> If I use a value of 60000 for example (IN THE SENDER CODE) does that mean
> that the message will be deleted from the store if not consumed in
> aproximately 1 minute? Is there any guarantee for this behavior?
>
> If not, is there a way I can enforce this?
>
> thank you
>
> The information in this email is confidential and may be legally
> privileged. It is intended solely for the addressee. Any opinions expressed
> are mine and do not necessarily represent the opinions of the Company.
> Emails are susceptible to interference. If you are not the intended
> recipient, any disclosure, copying, distribution or any action taken or
> omitted to be taken in reliance on it, is strictly prohibited and may be
> unlawful. If you have received this message in error, do not open any
> attachments but please notify the EndavaIT Service Desk on (+44 (0)870 423
> 0187), and delete this message from your system. The sender accepts no
> responsibility for information, errors or omissions in this email, or for
> its use or misuse, or for any act committed or omitted in connection with
> this communication. If in doubt, please verify the authenticity of the
> contents with the sender. Please rely on your own virus checkers as no
> responsibility is taken by the sender for any damage rising out of any bug
> or virus infection.
>
> Endava Limited is a company registered in England under company number
> 5722669 whose registered office is at 125 Old Broad Street, London, EC2N
> 1AR, United Kingdom. Endava Limited is the Endava group holding company and
> does not provide any services to clients. Each of Endava Limited and its
> subsidiaries is a separate legal entity and has no liability for another
> such entity's acts or omissions. Please refer to the “Legal” section on our
> website for a list of legal entities.
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com