是打发付付付付付付

    private static final Logger LOGGER = LoggerFactory.getLogger(MultiConsumer.class);
    private static final String TOPIC_EXCHANGE = "topicExchange1";
    private static final String ROUTING_KEY = "topic.unique.key";

    @RabbitListener(
            bindings =
                    {
                            @QueueBinding(
                                    value = @Queue(value = "topicQueue", durable = "true", exclusive = "false", autoDelete = "false"),
                                    exchange = @Exchange(value = TOPIC_EXCHANGE, type = ExchangeTypes.TOPIC), key = ROUTING_KEY),
                            @QueueBinding(
                                    value = @Queue(value = "topicQueue12", durable = "true", exclusive = "false", autoDelete = "false"),
                                    exchange = @Exchange(value = TOPIC_EXCHANGE, type = ExchangeTypes.TOPIC), key = ROUTING_KEY)
                    })
    public void dealMsg(String msg) {
        LOGGER.info("收到到消息:{}", msg);
    }

猜你喜欢

转载自www.cnblogs.com/yw0219/p/8965611.html