我正在试验 Dapr,看看我是否应该用 MS SDK 代替 Azure 资源。我正在试验的第一件事是将消息发送到 Azure 服务总线队列。
我需要设置服务总线消息的“Label”和“CorrelationId”属性。我已经尝试了一切,最终的消息queue
没有我需要的任何属性。
var message = "{\"CreateEmailBody\": \"(notification)\"}";
var metadata = new Dictionary<string, string>
{
{"ttlInSeconds", "60"},
{"label", "123123123"},
};
await daprClient.InvokeBindingAsync("servicebus", "create", message, metadata);
只有time to live
财产有效。如果可以设置消息的属性,我在任何地方的文档中都找不到。https://docs.dapr.io/reference/components-reference/supported-bindings/servicebusqueues/
在我看来,这是目前 Dapr 的一个巨大缺点。