RabbitMQ入门实验中遇到的问题:
报错的消费者类
package org.exmaple.rabbitmq.topics;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.DeliverCallback;
import com.rabbitmq.client.Delivery;
import org.exmaple.rabbitmq.utils.ConnectionUtil;
public class Recv2 {
private final static String QUEUE_NAME = "topic_exchange_queue_Q2";
private final static String EXCHANGE_NAME = "test_topic_exchange";
public static void main(String[] args) throws Exception {
Connection connection = ConnectionUtil.getConnection();
Channel channel = connection.createChannel();
channel.queueDeclare(QUEUE_NAME, false, false, false, null);
channel.exchangeBind(QUEUE_NAME, EXCHANGE_NAME, "*.*.rabbit");
DeliverCallback deliverCallback = (String consumerTag, Delivery delivery