将 dapr 从 1.9.5
升级至 1.11.2
后遇到的问题,错误日志如下:
Dapr.DaprException: Publish operation failed: the Dapr endpoint indicated a failure. See InnerException for details.
---> Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="error when publish to topic i.BlogPostPublishedIntegrationEvent in pubsub pubsub: Exception (406) Reason: "PRECONDITION_FAILED - inequivalent arg 'auto_delete' for exchange 'i.BlogPostPublishedIntegrationEvent' in vhost '/': received 'true' but current is 'false'"")
at Dapr.Client.DaprClientGrpc.MakePublishRequest(String pubsubName, String topicName, ByteString content, Dictionary`2 metadata, String dataContentType, CancellationToken cancellationToken)
请问如何解决?
在 pubsub.rabbitmq 中将 deletedWhenUnused 设为 false
可以解决
编辑 pubsub component 清单
kubectl edit component pubsub
在 spec 中添加
spec:
- name: deletedWhenUnused
value: false