mirror of https://github.com/apache/activemq.git
Set timestamp on the broker
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@376260 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e99fc62e4a
commit
b59d0b5938
|
@ -296,6 +296,10 @@ public class RegionBroker implements Broker {
|
|||
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue