I'm getting an error like this when i try to consume a topic using DAPR pub/sub. It looks like the message is consumed successfully, but an error is logged just before. Couldn't identify the root-cause. The issue happens only if I use declarative way of subscription. If we use the [Topic] annotation instead, no error is logged. I tried using different message brokers like rabbitMQ, redis, azure message bus. The case is same for all. Here's the configuration I use
pubsub.yml
# apiVersion: dapr.io/v1alpha1
# kind: Component
# metadata:
# name: pubsub
# spec:
# type: pubsub.redis
# version: v1
# metadata:
# - name: redisHost
# value: redis:6379
# - name: actorStateStore
# value: "true"
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: pubsub
spec:
type: pubsub.azure.servicebus.topics
version: v1
metadata:
- name: connectionString
value:
Endpoint=sb://daprpocservicebus.servicebus.windows.net/;SharedAccessKeyName=RootManageShared AccessKey;SharedAccessKey=xxxxxxx
subscription.yml
apiVersion: dapr.io/v2alpha1
kind: Subscription
metadata:
name: pubsub
spec:
topic: weatherforecasttopic
routes:
default: /consume
pubsubname: pubsub
scopes:
- daprpublisher
- daprconsumer
And I'm publishing the values like this
await _daprClient.PublishEventAsync<WeatherForecast[]>(PubsubName, TopicNameOfWeatherForecast, forecast);
I'm stuck here. Any help much appreciated. Thanks in advance.
