You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Andreas Ländle (JIRA)" <ji...@apache.org> on 2010/05/21 15:11:48 UTC
[jira] Created: (AMQNET-253) Expiration date of message are corrupt
if the producer 'timestamping' is disabled
Expiration date of message are corrupt if the producer 'timestamping' is disabled
---------------------------------------------------------------------------------
Key: AMQNET-253
URL: https://issues.apache.org/activemq/browse/AMQNET-253
Project: ActiveMQ .Net
Issue Type: Bug
Components: NMS
Reporter: Andreas Ländle
Assignee: Jim Gomes
Priority: Minor
Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
Reproduction:
Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
Workaround:
I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
var stompMessage = nmsMessage as BaseMessage;
if (stompMessage != null)
{ stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
Please let me know if i was unclear or if you need more information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQNET-253) STOMP: Expiration date of message are
corrupt if the producer 'timestamping' is disabled
Posted by "Andreas Ländle (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Ländle updated AMQNET-253:
----------------------------------
Affects Version/s: 1.2.0
I only have tested it with the source from the 1.2.x-branch - but as far as i can see there are no relevant differences to the trunk.
> STOMP: Expiration date of message are corrupt if the producer 'timestamping' is disabled
> ----------------------------------------------------------------------------------------
>
> Key: AMQNET-253
> URL: https://issues.apache.org/activemq/browse/AMQNET-253
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: NMS
> Affects Versions: 1.2.0
> Reporter: Andreas Ländle
> Assignee: Jim Gomes
> Priority: Minor
>
> Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
> Reproduction:
> Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
> Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
> (previous to the fix for https://issues.apache.org/activemq/browse/AMQNET-245 the TimeStamp of a message was set during construction - so the interconnection of Timestamp and TTL wasn't so obvious)
> Workaround:
> I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
> var stompMessage = nmsMessage as BaseMessage;
> if (stompMessage != null)
> { stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
> Please let me know if i was unclear or if you need more information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQNET-253) STOMP: Expiration date of message
are corrupt if the producer 'timestamping' is disabled
Posted by "Andreas Ländle (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59507#action_59507 ]
Andreas Ländle commented on AMQNET-253:
---------------------------------------
Hi Timothy,
sorry for being unclear - the bug was introduced with the fix for AMQNET-245 - let me explain...
a) The producer only set's the timestamp if it's DisableMessageTimestamp property is false
b) The expiration date of a message is calculated ( ExpirationDate = TimeStamp + TimeToLive)
So since the fix for AMQNET-245 the TimeStamp isn't initialized in the constructor of the Message class (trunk: SVN# 929131 - Message.cs)
So imagine - the timestamp of the message is never set (value is 0), but i set the TimeToLive property of the message!
The message gets send and it's expiration date is calculated - which means ExpirationDate = 0 + TimeToLive.
Indeed the problem only occurs in a very rare case - i didn't want to transmit the timestamp but i want to transfer an expiration date (it's important to us to reduce data volume).
Hope things got clearer now - if not please let me know and i will try to find a even better explanation.
> STOMP: Expiration date of message are corrupt if the producer 'timestamping' is disabled
> ----------------------------------------------------------------------------------------
>
> Key: AMQNET-253
> URL: https://issues.apache.org/activemq/browse/AMQNET-253
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: NMS
> Affects Versions: 1.2.0
> Reporter: Andreas Ländle
> Assignee: Jim Gomes
> Priority: Minor
>
> Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
> Reproduction:
> Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
> Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
> (previous to the fix for https://issues.apache.org/activemq/browse/AMQNET-245 the TimeStamp of a message was set during construction - so the interconnection of Timestamp and TTL wasn't so obvious)
> Workaround:
> I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
> var stompMessage = nmsMessage as BaseMessage;
> if (stompMessage != null)
> { stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
> Please let me know if i was unclear or if you need more information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQNET-253) STOMP: Expiration date of message
are corrupt if the producer 'timestamping' is disabled
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59505#action_59505 ]
Timothy Bish commented on AMQNET-253:
-------------------------------------
There were several changes made in the NMS.Stomp trunk for this issue https://issues.apache.org/activemq/browse/AMQNET-245 which may resolve you problem.
> STOMP: Expiration date of message are corrupt if the producer 'timestamping' is disabled
> ----------------------------------------------------------------------------------------
>
> Key: AMQNET-253
> URL: https://issues.apache.org/activemq/browse/AMQNET-253
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: NMS
> Affects Versions: 1.2.0
> Reporter: Andreas Ländle
> Assignee: Jim Gomes
> Priority: Minor
>
> Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
> Reproduction:
> Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
> Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
> (previous to the fix for https://issues.apache.org/activemq/browse/AMQNET-245 the TimeStamp of a message was set during construction - so the interconnection of Timestamp and TTL wasn't so obvious)
> Workaround:
> I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
> var stompMessage = nmsMessage as BaseMessage;
> if (stompMessage != null)
> { stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
> Please let me know if i was unclear or if you need more information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQNET-253) STOMP: Expiration date of message
are corrupt if the producer 'timestamping' is disabled
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59509#action_59509 ]
Timothy Bish commented on AMQNET-253:
-------------------------------------
The best explanation would be an NUnit test case that demonstrates the issue.
I can't comment further until I have some time to look at the code again. We welcome patches with associated test cases if you have a fix in mind.
> STOMP: Expiration date of message are corrupt if the producer 'timestamping' is disabled
> ----------------------------------------------------------------------------------------
>
> Key: AMQNET-253
> URL: https://issues.apache.org/activemq/browse/AMQNET-253
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: NMS
> Affects Versions: 1.2.0
> Reporter: Andreas Ländle
> Assignee: Jim Gomes
> Priority: Minor
>
> Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
> Reproduction:
> Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
> Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
> (previous to the fix for https://issues.apache.org/activemq/browse/AMQNET-245 the TimeStamp of a message was set during construction - so the interconnection of Timestamp and TTL wasn't so obvious)
> Workaround:
> I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
> var stompMessage = nmsMessage as BaseMessage;
> if (stompMessage != null)
> { stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
> Please let me know if i was unclear or if you need more information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (AMQNET-253) STOMP: Expiration date of message are
corrupt if the producer 'timestamping' is disabled
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish resolved AMQNET-253.
---------------------------------
Fix Version/s: 1.3.0
Resolution: Fixed
I believe I've fixed this in Trunk so that it works the way you'd expect. I also fixed the send methods such that they now honor the TimeToLive setting in MessageProducer which defaults to Zero of course.
> STOMP: Expiration date of message are corrupt if the producer 'timestamping' is disabled
> ----------------------------------------------------------------------------------------
>
> Key: AMQNET-253
> URL: https://issues.apache.org/activemq/browse/AMQNET-253
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: NMS
> Affects Versions: 1.2.0
> Reporter: Andreas Ländle
> Assignee: Timothy Bish
> Priority: Minor
> Fix For: 1.3.0
>
>
> Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
> Reproduction:
> Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
> Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
> (previous to the fix for https://issues.apache.org/activemq/browse/AMQNET-245 the TimeStamp of a message was set during construction - so the interconnection of Timestamp and TTL wasn't so obvious)
> Workaround:
> I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
> var stompMessage = nmsMessage as BaseMessage;
> if (stompMessage != null)
> { stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
> Please let me know if i was unclear or if you need more information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQNET-253) STOMP: Expiration date of message
are corrupt if the producer 'timestamping' is disabled
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59502#action_59502 ]
Timothy Bish commented on AMQNET-253:
-------------------------------------
Have you tried the trunk version of the code?
> STOMP: Expiration date of message are corrupt if the producer 'timestamping' is disabled
> ----------------------------------------------------------------------------------------
>
> Key: AMQNET-253
> URL: https://issues.apache.org/activemq/browse/AMQNET-253
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: NMS
> Reporter: Andreas Ländle
> Assignee: Jim Gomes
> Priority: Minor
>
> Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
> Reproduction:
> Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
> Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
> (previous to the fix for https://issues.apache.org/activemq/browse/AMQNET-245 the TimeStamp of a message was set during construction - so the interconnection of Timestamp and TTL wasn't so obvious)
> Workaround:
> I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
> var stompMessage = nmsMessage as BaseMessage;
> if (stompMessage != null)
> { stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
> Please let me know if i was unclear or if you need more information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (AMQNET-253) STOMP: Expiration date of message are
corrupt if the producer 'timestamping' is disabled
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish reassigned AMQNET-253:
-----------------------------------
Assignee: Timothy Bish (was: Jim Gomes)
> STOMP: Expiration date of message are corrupt if the producer 'timestamping' is disabled
> ----------------------------------------------------------------------------------------
>
> Key: AMQNET-253
> URL: https://issues.apache.org/activemq/browse/AMQNET-253
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: NMS
> Affects Versions: 1.2.0
> Reporter: Andreas Ländle
> Assignee: Timothy Bish
> Priority: Minor
>
> Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
> Reproduction:
> Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
> Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
> (previous to the fix for https://issues.apache.org/activemq/browse/AMQNET-245 the TimeStamp of a message was set during construction - so the interconnection of Timestamp and TTL wasn't so obvious)
> Workaround:
> I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
> var stompMessage = nmsMessage as BaseMessage;
> if (stompMessage != null)
> { stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
> Please let me know if i was unclear or if you need more information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQNET-253) STOMP: Expiration date of message are
corrupt if the producer 'timestamping' is disabled
Posted by "Andreas Ländle (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Ländle updated AMQNET-253:
----------------------------------
Description:
Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
Reproduction:
Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
(previous to the fix for https://issues.apache.org/activemq/browse/AMQNET-245 the TimeStamp of a message was set during construction - so the interconnection of Timestamp and TTL wasn't so obvious)
Workaround:
I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
var stompMessage = nmsMessage as BaseMessage;
if (stompMessage != null)
{ stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
Please let me know if i was unclear or if you need more information.
was:
Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
Reproduction:
Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
Workaround:
I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
var stompMessage = nmsMessage as BaseMessage;
if (stompMessage != null)
{ stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
Please let me know if i was unclear or if you need more information.
> STOMP: Expiration date of message are corrupt if the producer 'timestamping' is disabled
> ----------------------------------------------------------------------------------------
>
> Key: AMQNET-253
> URL: https://issues.apache.org/activemq/browse/AMQNET-253
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: NMS
> Reporter: Andreas Ländle
> Assignee: Jim Gomes
> Priority: Minor
>
> Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
> Reproduction:
> Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
> Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
> (previous to the fix for https://issues.apache.org/activemq/browse/AMQNET-245 the TimeStamp of a message was set during construction - so the interconnection of Timestamp and TTL wasn't so obvious)
> Workaround:
> I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
> var stompMessage = nmsMessage as BaseMessage;
> if (stompMessage != null)
> { stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
> Please let me know if i was unclear or if you need more information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQNET-253) STOMP: Expiration date of message are
corrupt if the producer 'timestamping' is disabled
Posted by "Andreas Ländle (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Ländle updated AMQNET-253:
----------------------------------
Summary: STOMP: Expiration date of message are corrupt if the producer 'timestamping' is disabled (was: Expiration date of message are corrupt if the producer 'timestamping' is disabled)
> STOMP: Expiration date of message are corrupt if the producer 'timestamping' is disabled
> ----------------------------------------------------------------------------------------
>
> Key: AMQNET-253
> URL: https://issues.apache.org/activemq/browse/AMQNET-253
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: NMS
> Reporter: Andreas Ländle
> Assignee: Jim Gomes
> Priority: Minor
>
> Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTimeToLive properties - Disabling the timestamps on the producer results in corrupted expiration dates of the messages!
> Reproduction:
> Set the TTL of a message to 1 hour - send this message via a producer which has DisableMessageTimestamp=true.
> Now take a look at the "expires" field of the transfered message - it's value is all to small (and so the broker would discard the message immediately).
> Workaround:
> I have worked around this issue with a dirty hack - i just bypass the TTL-Timespan.
> var stompMessage = nmsMessage as BaseMessage;
> if (stompMessage != null)
> { stompMessage.Expiration = DateUtils.ToJavaTimeUtc(myExpirationDate); }
> Please let me know if i was unclear or if you need more information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.