我正在尝试使用
在here中配置一个安慰的队列// Provision it, and do not fail if it already exists
session.Provision(queue, endpointProps,
ProvisionFlag.IgnoreErrorIfEndpointAlreadyExists & ProvisionFlag.WaitForConfirm, null);
Console.WriteLine("Queue '{0}' has been created and provisioned.", queueName);
然而,即使我将标志设置为ProvisionFlag.WaitForConfirm,如示例中我仍然获得ReturnCode In_Progress,这意味着配置不会按预期阻塞,并且还提供队列alread存在的错误。有什么理由吗?
答案 0 :(得分:1)
我发现在Github上Solace的文档是错误的。而不是使用&运营商应该是|。
更新了使用|喜欢
// Provision it, and do not fail if it already exists
session.Provision(queue, endpointProps,
ProvisionFlag.IgnoreErrorIfEndpointAlreadyExists | ProvisionFlag.WaitForConfirm, null);
Console.WriteLine("Queue '{0}' has been created and provisioned.", queueName);
它有效。