cjwmorgan-sol commented on issue #8: AMQNET-591: Transactions support
URL: https://github.com/apache/activemq-nms-amqp/pull/8#issuecomment-517449165
 
 
   @HavretGC I think I found the source of my issue. When the TTL is set to 
default on the producer the amqp field expiry time is set on out going message 
to "1/1/0001 5:00:00 AM" where the DateTime.minValue is "1/1/0001 12:00:00 AM". 
This caused all my consumed messages to be expired and dropped locally. Looks 
like the AbsoluteExpiry time get set send the session on send. I'm not if this 
should be done as the [jms mapping 
document](https://www.oasis-open.org/committees/download.php/59981/amqp-bindmap-jms-v1.0-wd07.pdf)
 states that if the ttl is 0 the AbsoluteExpiry must be omitted rather then set 
to zero, see sections 3.3.2 and 3.2.1. If I comment out the section of code :
   ```
   if (hasTTL)
                   outbound.Facade.Expiration = timeStamp + timeToLive;
    //else
                   //outbound.Facade.Expiration = DateTime.MinValue;
   ```
   from NmsSession.Send my interop tests start passing (with only two failures) 
and the transaction sample works.
   
   I notice qpid jms has a special set the absoluteExpiryTime to null when 
given a value of 0 or null to the facade. I'm not sure if this is possible with 
the interface provided by amqpnetlite as DateTime is a struct and must have 
value. It might be possible to work around this by creating a Properties 
instance (which has null for absoluteExpiryTime) and copy all other values 
without setting the absoluteExpiryTime for when setting the Expiration to 0. 
Not to keen on that though the interface for the amqpnetlite message should be 
enhanced to be able to set a null absoluteExpiryTime.
   
   Reguardless currently the provider in not creating amqp frames with the 
correct absoluteExpiryTime field.
   @HavretGC and @michaelandrepearce what do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to