如何将micronaut rabbitmq客户端与BuiltinExchangeType主题一起使用

如何将micronaut rabbitmq客户端与BuiltinExchangeType主题一起使用,rabbitmq,micronaut,Rabbitmq,Micronaut,我想使用micronaut rabbitmq通过主题在服务之间发送消息。 因此,我在ChannelInitializer中创建了一个exchange、队列和绑定,如下所示: channel.exchangeDeclare("registration", BuiltinExchangeType.TOPIC, true) channel.queueDeclare("user_new", true, false, false, null) channel.que

我想使用micronaut rabbitmq通过主题在服务之间发送消息。 因此,我在ChannelInitializer中创建了一个exchange、队列和绑定,如下所示:

channel.exchangeDeclare("registration", BuiltinExchangeType.TOPIC, true)
channel.queueDeclare("user_new", true, false, false, null)
channel.queueBind("user_new", "registration", "user.new.#")


channel.queueDeclare("user_all", true, false, false, null)
channel.queueBind("user_all", "registration", "user.#")
当我尝试向routingkey“user.new”发送消息时,它不会发送到任何队列

@Binding("user.new")
override fun userCreated(event: UserCreatedEvent)
我希望,由于主题routingkeys,它被发送到两个队列

如果我将“user\u new”队列重命名为“user.new”,则消息将发送到此队列。但由于我希望消息同时出现在两个队列中,因此没有选择

任何帮助都将不胜感激


谢谢

我的问题是,我没有在
@RabbitClient

@RabbitClient
更改为
@RabbitClient(“注册”)
后,一切都正常工作