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);
}
is to send pay pay pay pay
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=325055553&siteId=291194637
Ranking