无法向 Azure 主题订阅添加规则
Cannot add a rule to Azure topic subscription
这是一个非常基本的场景,我不知道为什么它不起作用。我无法向主题添加规则。
static void Main(string[] args)
{
var subscriptionClient = new SubscriptionClient(
nsConnString,
topicName,
subsName,
ReceiveMode.ReceiveAndDelete);
subscriptionClient.AddRuleAsync(new RuleDescription
{
Filter = new CorrelationFilter { Label = Guid.NewGuid().ToString() },
Name = Guid.NewGuid().ToString()
}).Wait();
Console.WriteLine("Success");
Console.ReadKey();
}
AddRuleAsync 调用总是抛出 - "The service was unable to process the request; please retry the operation."。服务总线是使用 MS 入门部分创建的。我在 .NET Core 中使用 0.0.7-preview 包。我可以使用我创建的主题发送和接收消息,但出于某种原因我无法添加规则。
我可以用 0.0.7-preview 包重现你提到的问题。请尝试使用最新的 Microsoft.Azure.ServiceBus 1.0.0-RC1 版本。它在我这边工作正常。
这是一个非常基本的场景,我不知道为什么它不起作用。我无法向主题添加规则。
static void Main(string[] args)
{
var subscriptionClient = new SubscriptionClient(
nsConnString,
topicName,
subsName,
ReceiveMode.ReceiveAndDelete);
subscriptionClient.AddRuleAsync(new RuleDescription
{
Filter = new CorrelationFilter { Label = Guid.NewGuid().ToString() },
Name = Guid.NewGuid().ToString()
}).Wait();
Console.WriteLine("Success");
Console.ReadKey();
}
AddRuleAsync 调用总是抛出 - "The service was unable to process the request; please retry the operation."。服务总线是使用 MS 入门部分创建的。我在 .NET Core 中使用 0.0.7-preview 包。我可以使用我创建的主题发送和接收消息,但出于某种原因我无法添加规则。
我可以用 0.0.7-preview 包重现你提到的问题。请尝试使用最新的 Microsoft.Azure.ServiceBus 1.0.0-RC1 版本。它在我这边工作正常。