-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Description
Describe the bug
When transactionCoordinatorEnabled is true in standalone.conf,there is error consuming with pushing of RabbitMQ client,but it is normal that consuming with pulling.
The detailed logs is as following, the time of correct logs is 2023-12-04T10:34:18,946+0800, the time of wrong logs is 2023-12-04T10:38:40,748+0800.
The logs of Close and Open the transactionCoordinatorEnabled .log
broker-k8s.log
Version:3.0.0
Test environment: standalone
To Reproduce
1、Open the transactionCoordinatorEnabled is true in standalone.conf
2、Open the aop feature normally
3、Start the standalone service
4、code of Rabbitmq as follows:
// create connection
ConnectionFactory connectionFactory = new ConnectionFactory();
connectionFactory.setVirtualHost("vhost1");
connectionFactory.setHost("127.0.0.1");
connectionFactory.setPort(5682);
Connection connection = connectionFactory.newConnection();
Channel channel = connection.createChannel();
channel.basicQos(2);
String exchange = "ex1";
String queue = "qu1";
// exchage declare
channel.exchangeDeclare(exchange, BuiltinExchangeType.FANOUT, true, false, false, null);
// queue declare and bind
channel.queueDeclare(queue, true, false, false, null);
channel.queueBind(queue, exchange, "");
// publish some messages
channel.basicPublish(exchange, "", null, ("hello ").getBytes());
// consume messages,push
CountDownLatch countDownLatch = new CountDownLatch(12);
channel.basicConsume(queue, true,new DefaultConsumer(channel) {
@Override
public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException {
System.out.println("receive msg: " + new String(body));
countDownLatch.countDown();
}
});
countDownLatch.await();
// release resource
channel.close();
connection.close();
Expected behavior
The Aop function is normal when transactionCoordinatorEnabled is true.
Screenshots