【问题标题】:Windows Service Bus messages disappearingWindows 服务总线消息消失
【发布时间】:2014-03-31 21:31:40
【问题描述】:

我有一个消息消失的案例。我有以下服务总线的实现:

BrokeredMessage msg = new BrokeredMessage(messageContent);
msg.TimeToLive = messageLiveTime;

queueClient.SendAsync(message);

// Later

var messageOptions = new OnMessageOptions() {MaxConcurrentCalls = maxConcurrentCallsToCallBack};
client.OnMessage((incomingMessage) =>
{
    T content = CommonServiceBus.ExtractMessageContent<T>(incomingMessage);

    if (content != null)
    {
       callBack(content); 
    }
}, messageOptions);

我有 3 个 MaxConcurrentCalls,消息 TTL 是 12 小时;但是,我发送了大约 10 条消息(每条大约需要 30 秒才能完成),前 9 条左右得到处理,但第 10 条从未收到。

我尝试过的事情:

  1. 其他人没有使用这些消息。
  2. 消息不会过期(至少它们的 TTL 设置正确)

如果我将 MaxConcurrentCalls 降低到 1,它会变得更糟。某些东西正在消耗消息(或消息即将过期),但我不知道在哪里或如何。

【问题讨论】:

    标签: c# servicebus azureservicebus


    【解决方案1】:

    我们遇到了类似的问题,事实证明,只有当消息 TTL 短于容器 TTL 时才使用它。确保您没有设置容器 TTL 或将其设置为大于您将使用的最大消息 TTL 的值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-07
      • 2012-02-21
      • 2012-11-17
      • 1970-01-01
      • 2019-02-12
      • 2015-06-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多