You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by shahbour <sh...@gmail.com> on 2016/03/17 20:04:35 UTC

ActiveMQ Queue TTL

Hello

I want to set a default Time to live for all messages in a queue , is it
possible and how

BR
Shahbour



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Queue TTL

Posted by Timothy Bish <ta...@gmail.com>.
STOMP Message expiration in action:
https://github.com/apache/activemq/blob/master/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java#L1810

On 03/18/2016 08:57 AM, shahbour wrote:
> If i got you correct , some headers on stomp are translated into JMSheaders
> , here they are http://activemq.apache.org/stomp.html specifically in
> *"Stomp extensions for JMS message semantics"*
>
> BR
>
> Shahbour
>
> On Fri, Mar 18, 2016 at 1:21 PM Tim Bain [via ActiveMQ] <
> ml-node+s2283324n4709675h86@n4.nabble.com> wrote:
>
>> I thought (assumed, I guess) STOMP was just the transfer protocol but that
>> once the message made it to the broker it would be treated like any other
>> message.  So I had assumed you would set the same headers as for an
>> OpenWire message, including JMSExpiration.  Did I assume wrongly?
>> On Mar 18, 2016 6:53 AM, "shahbour" <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=4709675&i=0>> wrote:
>>
>>> Thanks i intercepted the message and added an expires header to the
>> STOMP ,
>>> ActiveMQ stomp doesn't support ttl right ?
>>>
>>> On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4709675&i=1>>
>> wrote:
>>>> Time to live must be set by the producer; I'm not aware of a built-in
>> way
>>>> to set it from the broker.  The one thing you might be able to do is
>> use
>>>> an
>>>> embedded Camel route to set that attribute on each message as they are
>>>> received by the broker, but I've never tried that so I can't promise
>>> it'll
>>>> work.
>>>> On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
>>>> <http:///user/SendEmail.jtp?type=node&node=4709663&i=0>> wrote:
>>>>
>>>>> Hello
>>>>>
>>>>> I want to set a default Time to live for all messages in a queue ,
>> is
>>> it
>>>>> possible and how
>>>>>
>>>>> BR
>>>>> Shahbour
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
>>>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>>>
>>>>
>>>> ------------------------------
>>>> If you reply to this email, your message will be added to the
>> discussion
>>>> below:
>>>>
>>>>
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html
>>>> To unsubscribe from ActiveMQ Queue TTL, click here
>>>> <
>>>
>>>> .
>>>> NAML
>>>> <
>> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>>
>>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>>
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html
>>
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709675.html
>> To unsubscribe from ActiveMQ Queue TTL, click here
>> <http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4709580&code=c2hhaGJvdXJAZ21haWwuY29tfDQ3MDk1ODB8LTE4Mzg3NzU0ODM=>
>> .
>> NAML
>> <http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709676.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: ActiveMQ Queue TTL

Posted by Timothy Bish <ta...@gmail.com>.
On 03/18/2016 09:41 AM, Tim Bain wrote:
> More fundamentally, I'm saying that I have always assumed that when a STOMP
> message comes to a broker, it's translated into a JMS message and it stays
> in that format until it is delivered to a STOMP consumer.  If that's
> accurate, it means that all JMS headers are available to be set, and they
> will be acted upon by the broker in the normal fashion.   It's not about
> what headers are translated from STOMP, it's about whether the ones that
> aren't set by STOMP are available to be set by your Camel route.
>
> All of this is simply my assumptions, and it doesn't mean they're right,
> but hopefully someone who has better knowledge of how this works can say
> whether my assumptions are right.

You are correct, all messages enter the broker bits as an 
ActiveMQMessage instance translated from the protocol message type which 
will then behave as any other message would so a camel route in the 
broker etc doesn't need to know where it came from.  There are no STOMP 
messages or AMQP message etc, they are all converted to the canonical 
type and converted again to the protocol type on the way out to the 
STOMP consumer etc.


> Tim
> On Mar 18, 2016 7:26 AM, "shahbour" <sh...@gmail.com> wrote:
>
>> If i got you correct , some headers on stomp are translated into JMSheaders
>> , here they are http://activemq.apache.org/stomp.html specifically in
>> *"Stomp extensions for JMS message semantics"*
>>
>> BR
>>
>> Shahbour
>>
>> On Fri, Mar 18, 2016 at 1:21 PM Tim Bain [via ActiveMQ] <
>> ml-node+s2283324n4709675h86@n4.nabble.com> wrote:
>>
>>> I thought (assumed, I guess) STOMP was just the transfer protocol but
>> that
>>> once the message made it to the broker it would be treated like any other
>>> message.  So I had assumed you would set the same headers as for an
>>> OpenWire message, including JMSExpiration.  Did I assume wrongly?
>>> On Mar 18, 2016 6:53 AM, "shahbour" <[hidden email]
>>> <http:///user/SendEmail.jtp?type=node&node=4709675&i=0>> wrote:
>>>
>>>> Thanks i intercepted the message and added an expires header to the
>>> STOMP ,
>>>> ActiveMQ stomp doesn't support ttl right ?
>>>>
>>>> On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
>>>> [hidden email] <http://
>> /user/SendEmail.jtp?type=node&node=4709675&i=1>>
>>> wrote:
>>>>> Time to live must be set by the producer; I'm not aware of a built-in
>>> way
>>>>> to set it from the broker.  The one thing you might be able to do is
>>> use
>>>>> an
>>>>> embedded Camel route to set that attribute on each message as they
>> are
>>>>> received by the broker, but I've never tried that so I can't promise
>>>> it'll
>>>>> work.
>>>>> On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
>>>>> <http:///user/SendEmail.jtp?type=node&node=4709663&i=0>> wrote:
>>>>>
>>>>>> Hello
>>>>>>
>>>>>> I want to set a default Time to live for all messages in a queue ,
>>> is
>>>> it
>>>>>> possible and how
>>>>>>
>>>>>> BR
>>>>>> Shahbour
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>>
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
>>>>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>>>>
>>>>>
>>>>> ------------------------------
>>>>> If you reply to this email, your message will be added to the
>>> discussion
>>>>> below:
>>>>>
>>>>>
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html
>>>>> To unsubscribe from ActiveMQ Queue TTL, click here
>>>>> <
>>>>
>>>>> .
>>>>> NAML
>>>>> <
>> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>>
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html
>>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>> If you reply to this email, your message will be added to the discussion
>>> below:
>>>
>>>
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709675.html
>>> To unsubscribe from ActiveMQ Queue TTL, click here
>>> <
>> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4709580&code=c2hhaGJvdXJAZ21haWwuY29tfDQ3MDk1ODB8LTE4Mzg3NzU0ODM=
>>> .
>>> NAML
>>> <
>> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>>>
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709676.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: ActiveMQ Queue TTL

Posted by Tim Bain <tb...@alumni.duke.edu>.
More fundamentally, I'm saying that I have always assumed that when a STOMP
message comes to a broker, it's translated into a JMS message and it stays
in that format until it is delivered to a STOMP consumer.  If that's
accurate, it means that all JMS headers are available to be set, and they
will be acted upon by the broker in the normal fashion.   It's not about
what headers are translated from STOMP, it's about whether the ones that
aren't set by STOMP are available to be set by your Camel route.

All of this is simply my assumptions, and it doesn't mean they're right,
but hopefully someone who has better knowledge of how this works can say
whether my assumptions are right.

Tim
On Mar 18, 2016 7:26 AM, "shahbour" <sh...@gmail.com> wrote:

> If i got you correct , some headers on stomp are translated into JMSheaders
> , here they are http://activemq.apache.org/stomp.html specifically in
> *"Stomp extensions for JMS message semantics"*
>
> BR
>
> Shahbour
>
> On Fri, Mar 18, 2016 at 1:21 PM Tim Bain [via ActiveMQ] <
> ml-node+s2283324n4709675h86@n4.nabble.com> wrote:
>
> > I thought (assumed, I guess) STOMP was just the transfer protocol but
> that
> > once the message made it to the broker it would be treated like any other
> > message.  So I had assumed you would set the same headers as for an
> > OpenWire message, including JMSExpiration.  Did I assume wrongly?
> > On Mar 18, 2016 6:53 AM, "shahbour" <[hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=4709675&i=0>> wrote:
> >
> > > Thanks i intercepted the message and added an expires header to the
> > STOMP ,
> > > ActiveMQ stomp doesn't support ttl right ?
> > >
> > > On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
> > > [hidden email] <http://
> /user/SendEmail.jtp?type=node&node=4709675&i=1>>
> > wrote:
> > >
> > > > Time to live must be set by the producer; I'm not aware of a built-in
> > way
> > > > to set it from the broker.  The one thing you might be able to do is
> > use
> > > > an
> > > > embedded Camel route to set that attribute on each message as they
> are
> > > > received by the broker, but I've never tried that so I can't promise
> > > it'll
> > > > work.
> > > > On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
> > > > <http:///user/SendEmail.jtp?type=node&node=4709663&i=0>> wrote:
> > > >
> > > > > Hello
> > > > >
> > > > > I want to set a default Time to live for all messages in a queue ,
> > is
> > > it
> > > > > possible and how
> > > > >
> > > > > BR
> > > > > Shahbour
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
> > > > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > > > >
> > > >
> > > >
> > > > ------------------------------
> > > > If you reply to this email, your message will be added to the
> > discussion
> > > > below:
> > > >
> > > >
> > >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html
> > > > To unsubscribe from ActiveMQ Queue TTL, click here
> > > > <
> > >
> > >
> > > > .
> > > > NAML
> > > > <
> > >
> >
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html
> >
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709675.html
> > To unsubscribe from ActiveMQ Queue TTL, click here
> > <
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4709580&code=c2hhaGJvdXJAZ21haWwuY29tfDQ3MDk1ODB8LTE4Mzg3NzU0ODM=
> >
> > .
> > NAML
> > <
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709676.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Queue TTL

Posted by shahbour <sh...@gmail.com>.
If i got you correct , some headers on stomp are translated into JMSheaders
, here they are http://activemq.apache.org/stomp.html specifically in
*"Stomp extensions for JMS message semantics"*

BR

Shahbour

On Fri, Mar 18, 2016 at 1:21 PM Tim Bain [via ActiveMQ] <
ml-node+s2283324n4709675h86@n4.nabble.com> wrote:

> I thought (assumed, I guess) STOMP was just the transfer protocol but that
> once the message made it to the broker it would be treated like any other
> message.  So I had assumed you would set the same headers as for an
> OpenWire message, including JMSExpiration.  Did I assume wrongly?
> On Mar 18, 2016 6:53 AM, "shahbour" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4709675&i=0>> wrote:
>
> > Thanks i intercepted the message and added an expires header to the
> STOMP ,
> > ActiveMQ stomp doesn't support ttl right ?
> >
> > On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=4709675&i=1>>
> wrote:
> >
> > > Time to live must be set by the producer; I'm not aware of a built-in
> way
> > > to set it from the broker.  The one thing you might be able to do is
> use
> > > an
> > > embedded Camel route to set that attribute on each message as they are
> > > received by the broker, but I've never tried that so I can't promise
> > it'll
> > > work.
> > > On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
> > > <http:///user/SendEmail.jtp?type=node&node=4709663&i=0>> wrote:
> > >
> > > > Hello
> > > >
> > > > I want to set a default Time to live for all messages in a queue ,
> is
> > it
> > > > possible and how
> > > >
> > > > BR
> > > > Shahbour
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
> > > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > > >
> > >
> > >
> > > ------------------------------
> > > If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html
> > > To unsubscribe from ActiveMQ Queue TTL, click here
> > > <
> >
> >
> > > .
> > > NAML
> > > <
> >
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>
> > >
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html
>
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709675.html
> To unsubscribe from ActiveMQ Queue TTL, click here
> <http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4709580&code=c2hhaGJvdXJAZ21haWwuY29tfDQ3MDk1ODB8LTE4Mzg3NzU0ODM=>
> .
> NAML
> <http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709676.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Queue TTL

Posted by Tim Bain <tb...@alumni.duke.edu>.
I thought (assumed, I guess) STOMP was just the transfer protocol but that
once the message made it to the broker it would be treated like any other
message.  So I had assumed you would set the same headers as for an
OpenWire message, including JMSExpiration.  Did I assume wrongly?
On Mar 18, 2016 6:53 AM, "shahbour" <sh...@gmail.com> wrote:

> Thanks i intercepted the message and added an expires header to the STOMP ,
> ActiveMQ stomp doesn't support ttl right ?
>
> On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
> ml-node+s2283324n4709663h14@n4.nabble.com> wrote:
>
> > Time to live must be set by the producer; I'm not aware of a built-in way
> > to set it from the broker.  The one thing you might be able to do is use
> > an
> > embedded Camel route to set that attribute on each message as they are
> > received by the broker, but I've never tried that so I can't promise
> it'll
> > work.
> > On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=4709663&i=0>> wrote:
> >
> > > Hello
> > >
> > > I want to set a default Time to live for all messages in a queue , is
> it
> > > possible and how
> > >
> > > BR
> > > Shahbour
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >
> >
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html
> > To unsubscribe from ActiveMQ Queue TTL, click here
> > <
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4709580&code=c2hhaGJvdXJAZ21haWwuY29tfDQ3MDk1ODB8LTE4Mzg3NzU0ODM=
> >
> > .
> > NAML
> > <
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Queue TTL

Posted by shahbour <sh...@gmail.com>.
Thanks i intercepted the message and added an expires header to the STOMP ,
ActiveMQ stomp doesn't support ttl right ?

On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
ml-node+s2283324n4709663h14@n4.nabble.com> wrote:

> Time to live must be set by the producer; I'm not aware of a built-in way
> to set it from the broker.  The one thing you might be able to do is use
> an
> embedded Camel route to set that attribute on each message as they are
> received by the broker, but I've never tried that so I can't promise it'll
> work.
> On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4709663&i=0>> wrote:
>
> > Hello
> >
> > I want to set a default Time to live for all messages in a queue , is it
> > possible and how
> >
> > BR
> > Shahbour
> >
> >
> >
> > --
> > View this message in context:
> > http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html
> To unsubscribe from ActiveMQ Queue TTL, click here
> <http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4709580&code=c2hhaGJvdXJAZ21haWwuY29tfDQ3MDk1ODB8LTE4Mzg3NzU0ODM=>
> .
> NAML
> <http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Queue TTL

Posted by Tim Bain <tb...@alumni.duke.edu>.
I'd never noticed that option on the plugin; thanks for pointing it out!
On Mar 18, 2016 6:57 AM, "Timothy Bish" <ta...@gmail.com> wrote:

> Take a look at the TimeStampPlugin which has an option to set a TTL on
> messages that arrive without one.
> http://activemq.apache.org/timestampplugin.html
>
> On 03/18/2016 12:38 AM, Tim Bain wrote:
>
>> Time to live must be set by the producer; I'm not aware of a built-in way
>> to set it from the broker.  The one thing you might be able to do is use
>> an
>> embedded Camel route to set that attribute on each message as they are
>> received by the broker, but I've never tried that so I can't promise it'll
>> work.
>> On Mar 17, 2016 1:33 PM, "shahbour" <sh...@gmail.com> wrote:
>>
>> Hello
>>>
>>> I want to set a default Time to live for all messages in a queue , is it
>>> possible and how
>>>
>>> BR
>>> Shahbour
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>>
>
> --
> Tim Bish
> twitter: @tabish121
> blog: http://timbish.blogspot.com/
>
>

Re: ActiveMQ Queue TTL

Posted by Timothy Bish <ta...@gmail.com>.
Take a look at the TimeStampPlugin which has an option to set a TTL on 
messages that arrive without one.
http://activemq.apache.org/timestampplugin.html

On 03/18/2016 12:38 AM, Tim Bain wrote:
> Time to live must be set by the producer; I'm not aware of a built-in way
> to set it from the broker.  The one thing you might be able to do is use an
> embedded Camel route to set that attribute on each message as they are
> received by the broker, but I've never tried that so I can't promise it'll
> work.
> On Mar 17, 2016 1:33 PM, "shahbour" <sh...@gmail.com> wrote:
>
>> Hello
>>
>> I want to set a default Time to live for all messages in a queue , is it
>> possible and how
>>
>> BR
>> Shahbour
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>


-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: ActiveMQ Queue TTL

Posted by Tim Bain <tb...@alumni.duke.edu>.
Time to live must be set by the producer; I'm not aware of a built-in way
to set it from the broker.  The one thing you might be able to do is use an
embedded Camel route to set that attribute on each message as they are
received by the broker, but I've never tried that so I can't promise it'll
work.
On Mar 17, 2016 1:33 PM, "shahbour" <sh...@gmail.com> wrote:

> Hello
>
> I want to set a default Time to live for all messages in a queue , is it
> possible and how
>
> BR
> Shahbour
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>