Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: TimeoutManager seems to reset TimeSent header #5581

Open
ramonsmits opened this issue Feb 14, 2020 · 0 comments
Open

BUG: TimeoutManager seems to reset TimeSent header #5581

ramonsmits opened this issue Feb 14, 2020 · 0 comments

Comments

@ramonsmits
Copy link
Member

ramonsmits commented Feb 14, 2020

The TimeSent header seems to be overwritten with the time the timeout manager dispatched the message to the transport which results in the real timesent value to be lost.

This results in aged timeout manager entries that can be many years old to be sent as now.

Tested with:
Core:

    <PackageReference Include="NServiceBus.RabbitMQ">
      <Version>4.2.1</Version>
    </PackageReference>
    <PackageReference Include="NServiceBus.RavenDB">
      <Version>4.2.6</Version>
    </PackageReference>
    <PackageReference Include="RavenDB.Client">
      <Version>3.5.9</Version>
    </PackageReference>

This configuration cannot be tested with a later version due to the timeout manager not being used.

With v7 only MSMQ would currently be affected but with v6 most transports can be affected due to timeout manager its backwards compatibility.

Data

RavenDB Timeout document:

{
    "Destination": "RavenToSqlPersistence",
    "SagaId": "00000000-0000-0000-0000-000000000000",
    "State": "PD94bWwgdmVyc2lvbj0iMS4wIj8+PE15TWVzc2FnZSB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxucz0iaHR0cDovL3RlbXB1cmkubmV0LyI+PEF0PjIwMjAtMDItMTdUMTc6MTU6NDkuNDg3OTA2OFo8L0F0PjwvTXlNZXNzYWdlPg==",
    "Time": "2020-02-17T17:17:19.4879060Z",
    "OwningTimeoutManager": "RavenToSqlPersistence",
    "Headers": {
        "NServiceBus.MessageId": "964377a2-8493-460e-84c5-ab64011c7f75",
        "NServiceBus.MessageIntent": "Send",
        "NServiceBus.CorrelationId": "964377a2-8493-460e-84c5-ab64011c7f75",
        "NServiceBus.OriginatingMachine": "ZOLDER",
        "NServiceBus.OriginatingEndpoint": "RavenToSqlPersistence",
        "$.diagnostics.originating.hostid": "34b86c359d09498213e5d5f2b16a714e",
        "NServiceBus.ReplyToAddress": "RavenToSqlPersistence",
        "NServiceBus.ContentType": "text/xml",
        "NServiceBus.EnclosedMessageTypes": "MyMessage, Seeder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
        "NServiceBus.ConversationId": "0640d678-77e3-4f78-8265-ab64011c7f85",
        "NServiceBus.Version": "6.5.9",
        "NServiceBus.TimeSent": "2020-02-17 17:15:49:568909 Z",
        "NServiceBus.Timeout.RouteExpiredTimeoutTo": "RavenToSqlPersistence",
        "NServiceBus.Timeout.Expire": "2020-02-17 17:17:19:487906 Z",
        "NServiceBus.Transport.RabbitMQ.ConfirmationId": "1",
        "NServiceBus.NonDurableMessage": "False"
    }
}

Headers of received timeout:

NServiceBus.MessageId 964377a2-8493-460e-84c5-ab64011c7f75
NServiceBus.MessageIntent Send
NServiceBus.CorrelationId 964377a2-8493-460e-84c5-ab64011c7f75
NServiceBus.OriginatingMachine ZOLDER
NServiceBus.OriginatingEndpoint RavenToSqlPersistence
$.diagnostics.originating.hostid 34b86c359d09498213e5d5f2b16a714e
NServiceBus.ReplyToAddress RavenToSqlPersistence
NServiceBus.ContentType text/xml
NServiceBus.EnclosedMessageTypes MyMessage, Seeder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
NServiceBus.ConversationId 0640d678-77e3-4f78-8265-ab64011c7f85
NServiceBus.Version 6.5.9
NServiceBus.TimeSent 2020-02-17 17:17:20:152072 Z
NServiceBus.Timeout.RouteExpiredTimeoutTo RavenToSqlPersistence
NServiceBus.Timeout.Expire 2020-02-17 17:17:19:487906 Z
NServiceBus.Transport.RabbitMQ.ConfirmationId 3
NServiceBus.NonDurableMessage False
NServiceBus.RelatedToTimeoutId
@ramonsmits ramonsmits changed the title TimeoutManager seems to reset TimeSent header BUG: TimeoutManager seems to reset TimeSent header Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants