You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mkoppala <mk...@broadsoft.com> on 2016/10/20 12:27:27 UTC

activemq cms - timeToLive is creating an issue

Hi,
I am using activemq-cpp-3.9.3. I want to set ttl value on a producer or
while sending messages.
The moment I set ttl value using producer->setTimeToLive(30000), the
messages never delivered to the broker. If I comment above line all is fine
and messages are delivered properly. Can anyone help me to figure out the
issue here?





--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cms-timeToLive-is-creating-an-issue-tp4718128.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: activemq cms - timeToLive is creating an issue

Posted by Tim Bain <tb...@alumni.duke.edu>.
If you publish to a queue without any consumers using that code, you can
then browse the messages via the web console to see if they have the
JMSExpiration header set.  If not, the question is why it's not getting set
by your producer code.  If it is set, then the question is why the broker
isn't acting upon it in the way you expect.  So finding out the answer to
that question helps narrow the search space for the problem.

(The other) Tim

On Oct 20, 2016 10:48 AM, "mkoppala" <mk...@broadsoft.com> wrote:

> Sorry for less information.
> I tried the following:-
>
> Just now I changed the delivery mode to PERSISTENT and setting the ttl. The
> messages are getting delivered to the broker now.
>
> But still I see the messages are not discarded at broker after the timer
> expiry.
> I suppose the api call to setTimeToLive is not overriding the default
> value!?
> Some post says I need to set setExplicitQosEnabled(true) to set the below
> values. If so, how can I set this?
>
> producer->send(message.get(),DeliveryMode::PERSISTENT,4,60000);
>
> I also tried setting the ttl at producer and send(message.get()) But no
> help.
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/activemq-cms-timeToLive-is-creating-an-
> issue-tp4718128p4718135.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: activemq cms - timeToLive is creating an issue

Posted by mkoppala <mk...@broadsoft.com>.
Sorry for less information.
I tried the following:-

Just now I changed the delivery mode to PERSISTENT and setting the ttl. The
messages are getting delivered to the broker now.

But still I see the messages are not discarded at broker after the timer
expiry.
I suppose the api call to setTimeToLive is not overriding the default
value!?
Some post says I need to set setExplicitQosEnabled(true) to set the below
values. If so, how can I set this?

producer->send(message.get(),DeliveryMode::PERSISTENT,4,60000);

I also tried setting the ttl at producer and send(message.get()) But no
help.




--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cms-timeToLive-is-creating-an-issue-tp4718128p4718135.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: activemq cms - timeToLive is creating an issue

Posted by Timothy Bish <ta...@gmail.com>.
If you want someone to offer you help then it'd be good to cover what 
you've done to analyze the problem.

On 10/20/2016 09:27 AM, mkoppala wrote:
> I check in broker uri and also capture the trace on broker port.
> The clocks are in synch.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cms-timeToLive-is-creating-an-issue-tp4718128p4718133.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


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


Re: activemq cms - timeToLive is creating an issue

Posted by mkoppala <mk...@broadsoft.com>.
I check in broker uri and also capture the trace on broker port.
The clocks are in synch.



--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cms-timeToLive-is-creating-an-issue-tp4718128p4718133.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: activemq cms - timeToLive is creating an issue

Posted by Timothy Bish <ta...@gmail.com>.
How do you know they aren't delivered to the broker?
Have you checked that the clocks on the machines are in sync?

On 10/20/2016 08:27 AM, mkoppala wrote:
> Hi,
> I am using activemq-cpp-3.9.3. I want to set ttl value on a producer or
> while sending messages.
> The moment I set ttl value using producer->setTimeToLive(30000), the
> messages never delivered to the broker. If I comment above line all is fine
> and messages are delivered properly. Can anyone help me to figure out the
> issue here?
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cms-timeToLive-is-creating-an-issue-tp4718128.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


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