Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] There is a error of AOP consume when transactionCoordinatorEnabled is true #1069

Open
zhaoyajun2009 opened this issue Dec 4, 2023 · 0 comments
Labels

Comments

@zhaoyajun2009
Copy link

zhaoyajun2009 commented Dec 4, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant