Skip to content

AMQP mocks are missing routingKey #2000

Closed

Description

@diedoman

Describe the bug

When you import an asyncapi.yaml file with amqp091 bindings for a topic exchange, the generated mock messages that are sent every couple of seconds won't include a routing key.

The asyncapi bindings mentions the 'cc' and 'bcc' field in the operations spec where you can define the routing Key. Additionally, the example there includes an address field which could perhaps also be used to host the routing key, although not specifically mentioned there? reference: https://github.com/asyncapi/bindings/blob/master/amqp/README.md

Expected behavior

I updated the example spec from here: https://github.com/microcks/api-lifecycle/blob/master/account-service-demo-amqp/account-service-asyncapi-1.2.0.yml to version 3.0.0 of the asyncapi spec with an operation including the CC field.

sample_file.yaml

When listening to the topic exchange that is created after importing this file, you should receive messages on the topic exchange, with the routing_key set to user.signed_up.

Actual behavior

Messages are published to the topic exchange, but routing key is set to None.

How to Reproduce?

importing the file mentioned in the expected behaviour section should reproduce the issue (if microcks version 1.13.2. is deployed with asyncAPI capabilities and rabbitmq is configured using values.yaml

Microcks version or git rev

1.13.2

Install method (docker-compose, helm chart, operator, docker-desktop extension,...)

helm chart

Additional information

If I follow the implementation in the microcks repository I cannot find any function call of the amqpPublisher that sets the routing key to anything other than an empty string (e.g.

channel.basicPublish(destinationName, "", properties, value.getBytes(StandardCharsets.UTF_8));
)

Activity

  1. github-actions commented on Mar 20, 2026

    @github-actions

    👋 @diedoman

    Welcome to the Microcks community! 💖

    Thanks and congrats 🎉 for opening your first issue here! Be sure to follow the issue template or please update it accordingly.

    📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

    If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌"

    Hope you have a great time there!

    🌟 ~~~~~~~~~ 🌟

    📢 If you like Microcks, please ⭐ star ⭐ our repo to support it!

    🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

  2. lbroudoux commented on Mar 23, 2026

    @lbroudoux
    Member

    Seems totally legit as it looks like we're only doing a basic publish. I remember we're managing routing keys but it is only for tests, not for mocks.

  3. added this to the 1.14.0 milestone on Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions