Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription stops working when having 5 routing keys defined #7739

Open
byteAbit0101 opened this issue May 16, 2024 · 1 comment
Open

Subscription stops working when having 5 routing keys defined #7739

byteAbit0101 opened this issue May 16, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@byteAbit0101
Copy link

byteAbit0101 commented May 16, 2024

In what area(s)?

runtime

What version of Dapr?

1.12.4

Expected Behavior

  • 5 routing keys are supported.
  • Documentation:
    • stating what is the maximum amount of routingKeys
    • stating whether routingKeys have any kind of limits/constraints

Actual Behavior

When defining 5 routing keys the subscription stops working, no messages are getting pushed by Dapr to the defined route

Steps to Reproduce the Problem

  • RabbitMQ:
    • Version: 3.12.2
    • Exchange 'topica'>> durable - NO
  • Dapr
    • Version: 1.12.4
    • configuration:
      • pubsub.yaml
        apiVersion: dapr.io/v1alpha1
        kind: Component
        metadata:
          name: pubsub-a
        spec:
          type: pubsub.rabbitmq
          version: v1
          metadata:
          - name: consumerID
            value: "test-api"
          - name: connectionString
            value: {RABBIT-MQ-CONNECTION-STRING}
          - name: durable
            value: false
          - name: deletedWhenUnused
            value: false
          - name: autoAck
            value: false
          - name: deliveryMode
            value: 0
          - name: requeueInFailure
            value: false
          - name: prefetchCount
            value: 0
          - name: reconnectWait
            value: 5
          - name: concurrencyMode
            value: parallel
          - name: enableDeadLetter 
            value: false
          - name: exchangeKind
            value: topic
        
      • subscription.yaml
        apiVersion: dapr.io/v2alpha1
        kind: Subscription
        metadata:
          name: event-user-receiver
        spec:
          topic: topica
          routes: 
            default: /api/events/user
          pubsubname: pubsub-a
          metadata:
            routingKey: SYS.*.event.User.UserCreated.#, SYS.*.event.User.UserUpdated.#, SYS.*.event.User.UserDeleted.#, SYS.*.event.User.UserDeactivated.#, SYS.*.event.User.UserActivated.#
        scopes:
        - test-api
        

Release Note

RELEASE NOTE: FIX Supported routing key count -->

@byteAbit0101 byteAbit0101 added the kind/bug Something isn't working label May 16, 2024
@byteAbit0101
Copy link
Author

byteAbit0101 commented May 24, 2024

I found the solution

multiple routing keys need to be separated by a ',' as documented https://docs.dapr.io/reference/components-reference/supported-pubsub/setup-rabbitmq/#bind-multiple-routingkey

However, the routing key is not allowed to include spaces before or after the separator!!

solution:

routingKey: SYS.*.event.User.UserCreated.#,SYS.*.event.User.UserUpdated.#,SYS.*.event.User.UserDeleted.#,SYS.*.event.User.UserDeactivated.#,SYS.*.event.User.UserActivated.#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant