Issue Details (XML | Word | Printable)

Key: AMQ-1165
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Hiram Chirino
Reporter: Dain Sundstrom
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

RegionBroker resets JMS Timestamp

Created: 21/Feb/07 04:26 PM   Updated: 26/Feb/07 05:35 PM
Return to search
Component/s: None
Affects Version/s: 4.1.0
Fix Version/s: 4.1.1, 5.0.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Timestamp.patch 2007-02-21 04:26 PM Dain Sundstrom 5 kB

Patch Info: Patch Available


 Description  « Hide
The RegionBroker contains the following logic, which overwrites the JMSTimestamp. FWIU, the message timestamp should be set once at send and never changed by the broker.

if (message.getTimestamp() > 0 && (message.getBrokerPath() == null || message.getBrokerPath().length == 0)) { //timestamp not been disabled and has not passed through a network message.setTimestamp(System.currentTimeMillis()); }

Attached is a simple test case and patch that changes the '>' in the if statement above to '<='. I'm not sure if that is the proper fix, but it did make my problem go away.



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Create crucible review for all 4 changesets in
511463 by  Hiram Chirino (2 files)
25/Feb/07 12:29 AM (32 months, 14 days ago)
Fix for AMQ-1165

Made the broker side timestamping 'feature' (which is a JMS spec bug) and optional broker plugin that can be enabled if a user really wants to have the broker timestamping behaviour.

branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java 511463 history download (+47) new
branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java 511463 history download (+0 -4) diffs

512103 by  Hiram Chirino (1 file)
26/Feb/07 05:32 PM (32 months, 12 days ago)
512104 by  Hiram Chirino (1 file)
26/Feb/07 05:33 PM (32 months, 12 days ago)