我正在使用 ServiceBusReceiver(我想继续使用)从服务总线上的死信队列中读取。
但是,receiver.PeekMessagesAsync(550) 最多只能从死信队列中获取 250 条消息???我怎样才能改变这个?我已经将它设置为获取 550 条消息,所以不知道该怎么做。
string topic = "myTopic";
string subscriptionAndDeadletterPath = @"mySubscription/$deadletterqueue";
var paginationSize = 1000;
var dlqCount = 0;
var numberOfMessagesToFetchFromDlq = 550;
try
{
await using var client = new ServiceBusClient(connectionString);
var receiver = client.CreateReceiver(topic, subscriptionAndDeadletterPath, new ServiceBusReceiverOptions() { ReceiveMode = ServiceBusReceiveMode.PeekLock, PrefetchCount = paginationSize });
var messagesFromDlq = await receiver.PeekMessagesAsync(numberOfMessagesToFetchFromDlq);
dlqCount = messagesFromDlq.Count();
dlqCount 由于某种原因不会超过 250?int maxMessages 参数似乎在这个数字之上不起作用?