activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r376260 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
Date Thu, 09 Feb 2006 11:06:43 GMT
Author: rajdavies
Date: Thu Feb  9 03:06:41 2006
New Revision: 376260

URL: http://svn.apache.org/viewcvs?rev=376260&view=rev
Log:
Set timestamp on the broker

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java?rev=376260&r1=376259&r2=376260&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
Thu Feb  9 03:06:41 2006
@@ -296,6 +296,10 @@
 
     public void send(ConnectionContext context,  Message message) throws Throwable {
         message.getMessageId().setBrokerSequenceId(sequenceGenerator.getNextSequenceId());
+        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());
+        }
         ActiveMQDestination destination = message.getDestination();
         switch(destination.getDestinationType()) {
         case ActiveMQDestination.QUEUE_TYPE:



Mime
View raw message