Hi,
We have just started setting timeToLive when sending messages with the
ActiveMQ.Net client. However we get an exception when sending:
mscorlib.dll!System.DateTime.ToFileTimeUtc() + 0xad bytes
mscorlib.dll!System.DateTime.ToFileTime() + 0x1c bytes
NMS.ActiveMQ.DLL!ActiveMQ.Util.DateUtils.ToJavaTime(System.DateTime dateTime
= {0001-01-01 00:00:05}) Line 46 + 0x8 bytes C#
NMS.ActiveMQ.DLL!ActiveMQ.Util.DateUtils.ToJavaTime(System.TimeSpan
timeToLive = {00:00:05}) Line 41 + 0x35 bytes C#
NMS.ActiveMQ.DLL!ActiveMQ.MessageProducer.Send(NMS.IDestination destination
= {queue://test}, NMS.IMessage message = {ActiveMQBytesMessage[ ProducerId=
Destination= TransactionId= OriginalDestination= MessageId=MessageId[
ProducerId=ProducerId[ ConnectionId=a5e10bc2-46ce-4b5b-be85-d1ed6e0c7575
Value=1 SessionId=1 ] ProducerSequenceId=1 BrokerSequenceId=0 ]
OriginalTransactionId= GroupID= GroupSequence=0 CorrelationId=0
Persistent=False Expiration=0 Priority=0
ReplyTo=temp-queue://a5e10bc2-46ce-4b5b-be85-d1ed6e0c7575:1
Timestamp=128310953802143903 Type= Content=System.Byte[]
MarshalledProperties= DataStructure= TargetConsumerId= Compressed=False
RedeliveryCounter=0 BrokerPath= Arrival=0 UserID= RecievedByDFBridge=False
Droppable=False ]}, bool persistent = false, byte priority = 5,
System.TimeSpan timeToLive = {00:00:05}, bool specifiedTimeToLive = true)
Line 88 + 0x17 bytes C#
NMS.ActiveMQ.DLL!ActiveMQ.MessageProducer.Send(NMS.IDestination destination
= {queue://test}, NMS.IMessage message = {ActiveMQBytesMessage[ ProducerId=
Destination= TransactionId= OriginalDestination= MessageId=MessageId[
ProducerId=ProducerId[ ConnectionId=a5e10bc2-46ce-4b5b-be85-d1ed6e0c7575
Value=1 SessionId=1 ] ProducerSequenceId=1 BrokerSequenceId=0 ]
OriginalTransactionId= GroupID= GroupSequence=0 CorrelationId=0
Persistent=False Expiration=0 Priority=0
ReplyTo=temp-queue://a5e10bc2-46ce-4b5b-be85-d1ed6e0c7575:1
Timestamp=128310953802143903 Type= Content=System.Byte[]
MarshalledProperties= DataStructure= TargetConsumerId= Compressed=False
RedeliveryCounter=0 BrokerPath= Arrival=0 UserID= RecievedByDFBridge=False
Droppable=False ]}, bool persistent = false, byte priority = 5,
System.TimeSpan timeToLive = {00:00:05}) Line 62 + 0x27 bytes C#
When looking at the code for MessageProducer it looks like timestamp has
been omitted from the calculation of expiration:
if (specifiedTimeToLive) {
activeMessage.Expiration = ActiveMQ.Util.DateUtils.ToJavaTime(timeToLive);
}
It looks like a bug to me, do you agree?
Peter
--
View this message in context:
http://www.nabble.com/ActiveMQ.Net%3A-Client-does-not-include-timestamp-when-calculating-expiration-tf4312287s2354.html#a12277020
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.