Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Bug] DefaultMQPushConsumer don't clean after start fail #8725

Copy link
Copy link
@yuz10

Description

@yuz10
Issue body actions

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

Ubuntu 24.04

RocketMQ version

5.3.0

JDK Version

1.8.0

Describe the Bug

Start the DefaultMQPushConsumer with wrong nameserver address, consumer threads are still running after start fail.

Steps to Reproduce

start the DefaultMQPushConsumer with wrong nameserver address:

    public static void main(String[] args) throws InterruptedException, MQClientException {
        DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("consumerGroup");
        consumer.setNamesrvAddr("1.0.0.1:9876");
        consumer.subscribe("test", "*");
        consumer.registerMessageListener((MessageListenerConcurrently) (msgs, context) -> {
            return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
        });
        try {
            consumer.start();
        } catch (Exception e) {
            e.printStackTrace();
            System.out.printf("state: %s", consumer.getDefaultMQPushConsumerImpl().getServiceState());
        }
    }

What Did You Expect to See?

1、the consumer.start() method throws exception.
2、the state of getDefaultMQPushConsumerImpl is running.
3、the consumer threads "PullMessageService", "RebalaceService" are running, so the process will not exit after main function exits.

What Did You See Instead?

1、the consumer.start() method throws exception.
2、the state of getDefaultMQPushConsumerImpl is not running.
3、the consumer threads are not running.

Additional Context

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.