4

首先對設置的一些信息:有聚集NServiceBus:傳奇,超時後提高存儲隊列中的消息數

  • 我們正在運行NServiceBus v4.6.3
  • 分銷商是在羣集的機器上運行隊列。
  • 工作人員禁用TimeoutManager,並在分銷商上啓用。


我們正在經歷的

  • 當佐賀超時的處理,在存儲隊列中的消息的數量增加了一個。
  • 當郵件被延遲時,存儲隊列中的郵件數量增加1。


我們知道什麼

超時消息直接傳送到特定的本地隊列(該請求的超時在服務器上),而不是羣集隊列。這將繞過常規路徑,即從存儲隊列中刪除消息並在該worker上傳遞目標隊列。工作人員不知道這一點,並在處理超時消息後報告它已準備好處理新消息。

此行爲的原因是存儲在TimeoutData中的目標隊列被設置爲worker上的本地隊列而不是羣集隊列。這裏有一個例子:

{ 
    "Destination": { 
    "Queue": "DemoService", 
    "Machine": "STAGESVC04" 
    }, 
    "SagaId": "40bf1976-dab0-48a3-8e20-a39d00b59bb9", 
    "State": "PD94bWwgdmVyc2lvbj0iMS4wIiA/Pg0KPE1lc3NhZ2VzIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zPSJodHRwOi8vdGVtcHVyaS5uZXQvUmlrc3RvdG8uU2VydmljZS5CZXR0aW5nLk5TZXJ2aWNlQnVzSGFuZGxlcnMuU2FnYXMuVGVzdFNhZ2EiPgo8SVRoZVRpbWVvdXQ+CjwvSVRoZVRpbWVvdXQ+CjwvTWVzc2FnZXM+DQo=", 
    "Time": "2014-09-05T09:02:14.2110980Z", 
    "CorrelationId": "60558fe4-7111-4fe3-a4ff-a39d00b5c060\\0", 
    "OwningTimeoutManager": "DemoService", 
    "Headers": { 
    "NServiceBus.MessageId": "60558fe4-7111-4fe3-a4ff-a39d00b5c060", 
    "NServiceBus.CorrelationId": "60558fe4-7111-4fe3-a4ff-a39d00b5c060", 
    "NServiceBus.OriginatingEndpoint": "DemoService", 
    "$.diagnostics.originating.hostid": "23d0f908b1691ba8111e8ac282989a3d", 
    "NServiceBus.MessageIntent": "Send", 
    "NServiceBus.Version": "4.6.3", 
    "NServiceBus.TimeSent": "2014-09-05 09:01:44:211098 Z", 
    "NServiceBus.OriginatingMachine": "STAGESVC04", 
    "NServiceBus.SagaId": "40bf1976-dab0-48a3-8e20-a39d00b59bb9", 
    "NServiceBus.IsSagaTimeoutMessage": "True", 
    "NServiceBus.SagaType": "DemoService.NServiceBusHandlers.Sagas.TestSaga.TestSaga, DemoService.NServiceBusHandlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", 
    "NServiceBus.OriginatingSagaId": "40bf1976-dab0-48a3-8e20-a39d00b59bb9", 
    "NServiceBus.OriginatingSagaType": "DemoService.NServiceBusHandlers.Sagas.TestSaga.TestSaga, DemoService.NServiceBusHandlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", 
    "NServiceBus.ContentType": "text/xml", 
    "NServiceBus.EnclosedMessageTypes": "DemoService.NServiceBusHandlers.Sagas.TestSaga.ITheTimeout, DemoService.NServiceBusHandlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", 
    "NServiceBus.RelatedTo": "232aa1a9-dea2-4d98-9251-a39d00b59bc7", 
    "NServiceBus.ConversationId": "4661130d-a961-4b1d-abda-a39d00b59beb", 
    "WinIdName": "", 
    "CorrId": "60558fe4-7111-4fe3-a4ff-a39d00b5c060\\0", 
    "NServiceBus.IsDeferredMessage": "True", 
    "NServiceBus.Temporary.DelayDeliveryWith": "00:00:30", 
    "NServiceBus.Timeout.Expire": "2014-09-05 09:02:14:211098 Z", 
    "NServiceBus.Timeout.RouteExpiredTimeoutTo": "[email protected]", 
    "NServiceBus.Timeout.ReplyToAddress": "[email protected]" 
    } 
} 


我不知道我們正在經歷的是NServiceBus或配置錯誤的錯誤。有人知道嗎?

回答