[GitHub] activemq-artemis issue #2423: ARTEMIS-2168 Fix "populate-validated-user" fea...

2018-11-10 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/2423
  
Amqp headers cannot be changed per spec. I am kind of confused on what’s 
going on 

I’m a bit lost on a week or vacation.  


Can I have a TL;dr


---


[GitHub] activemq-artemis issue #2423: ARTEMIS-2168 Fix "populate-validated-user" fea...

2018-11-10 Thread michaelandrepearce
Github user michaelandrepearce commented on the issue:

https://github.com/apache/activemq-artemis/pull/2423
  
@tabish121 id disagree here, the message is already modified when broker 
features like enforced expiry-delay are being used.


```  public AMQPMessage setExpiration(long expiration) {
  if (properties != null) {
 if (expiration <= 0) {
properties.setAbsoluteExpiryTime(null);
 } else {
properties.setAbsoluteExpiryTime(new Date(expiration));
 }
  } else if (expiration > 0) {
 properties = new Properties();
 properties.setAbsoluteExpiryTime(new Date(expiration));
  }

  // We are overriding expiration with an Absolute expiration time so 
any
  // previous Header based TTL also needs to be removed.
  if (header != null) {
 header.setTtl(null);
  }

  this.expiration = Math.max(0, expiration);

  return this;
   }```





---