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

Open
#1,069 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, rabbitmq

Research direction

Start with standalone.conf and the RabbitMQ Java producer/consumer example, then compare the attached correct and incorrect logs with transactionCoordinatorEnabled enabled and disabled. Trace the push-consume entry point and transaction-coordinator interaction; done means push consumption works normally with the setting enabled while pull consumption remains unaffected.

Written by the indexing model from the issue text.

Description

type/bug

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

Dominant language
Java
Stars
123
Forks
41
Avg merge
4h 43m
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from streamnative/aop

All issues in streamnative/aop

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.