activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eddie Epstein (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQCPP-186) CMSExpiration computed incorrectly (?)
Date Fri, 04 Jul 2008 19:37:04 GMT

    [ https://issues.apache.org/activemq/browse/AMQCPP-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43961#action_43961
] 

Eddie Epstein commented on AMQCPP-186:
--------------------------------------

bq. Yes, this is known behavior. Our solution has been to turn on the timestamp plug-in that
will override the producer's timestamp, and adjust the message's timestamps to be in-sync
with the broker machine's time.

As I understand it, the TimeStampingBrokerPlugin changes the message timestamp set by the
producer's clock to the equivalent time on the broker's clock. This still doesn't fix the
problem because the test for expiration is done using yet a different clock: the consumer's.
Seems like the only way expiration can be done properly is to do the timestamp shift as per
the TimeStampingBrokerPlugin and then do the expiration test on the broker when it is fetching
the next message to deliver.

Does anybody agree with this?

> CMSExpiration computed incorrectly (?)
> --------------------------------------
>
>                 Key: AMQCPP-186
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-186
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>    Affects Versions: 2.1.3
>            Reporter: Eddie Epstein
>            Assignee: Nathan Mittler
>
> The C++ consumer is treating messages as expired in situations where the Java consumer
is not.
> It could be that the problem is due to the code in connector/openwire/commands/ActiveMQMessageBase.h
which compares the CMSExpiration time specified by producer.setTimeToLive()  with the local
clock on the consumer machine.
>         /**
>          * Returns if this message has expired, meaning that its
>          * Expiration time has elapsed.
>          * @returns true if message is expired.
>          */
>         virtual bool isExpired() const {
>             long long expireTime = this->getCMSExpiration();
>             long long currentTime = decaf::util::Date::getCurrentTimeMilliseconds();
>             if( expireTime > 0 && currentTime > expireTime ) {
>                 return true;
>             }
>             return false;
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message