Send message to arbitrary vhost / exchange with RabbitMQ / Spring AMQP
问题 I use RabbitMQ and Spring AMQP to send messages. I have this snippet: rabbitTemplate.convertAndSend(exchange, key, object); This works when I operate on a single VHOST . I have to receive messages from 1 queue and resend them to N exchanges (on many different VHOST s). How can I do it in Spring AMQP (ver 1.2) ? Is there anything better than manually defined <rabbit:connection-factory> (for each VHOST) and related elements in my xml context? 回答1: We added support for that in 1.3. See Routing