在练习中间件mq,用的idea,阿里云


ConnectionFactory connectionFactory = new ConnectionFactory();
        ConnectionFactory connectionFactory = new ConnectionFactory();
        connectionFactory.setHost("xxxx");
        connectionFactory.setUsername("xxx");
        connectionFactory.setPassword("xxx");
        Connection connection = connectionFactory.newConnection();
        Channel channel = connection.createChannel();
        channel.queueDeclare("three",false,false,false,null);
        String message="第3次发送消息";
        channel.basicPublish("","first",null,message.getBytes());
        System.out.println("消息发送完毕");

一开始消费者也是能获取到消息的,但是后来突然就不行了,查看web控制台,如下,这个应该是生产者都没把消息送到mq上?为啥这样啊

img


试了好多次了,可能原因是啥
看了会教程然后刚刚刷新了web控制台,first队列有了一条信息,然后消费者试了下也收到了,这个是延迟??不明白