Reputation: 3532
I have a case of disappearing messages. I have the following implementation of Service Bus:
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);
I have 3 MaxConcurrentCalls, and the message TTL is 12 hours; however, I send about 10 messages (each take about 30 seconds to complete) the first 9 or so get processed but the 10th is never received.
Things I've tried:
If I lower the MaxConcurrentCalls to 1 it gets worse. Something is consuming the messages (or the messages are expiring) but I have no idea where or how.
Upvotes: 0
Views: 413
Reputation: 354
We ran into a similar issue and it turns out that the message TTL only is used if it is shorter than the container TTL. Make sure you aren't setting the container TTL or set it to something bigger than the max message TTL you will use.
Upvotes: 1