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

[native]start multiple consumer in one process, or subscribe multiple topic in one consumer couldn't work. #271

Closed
wongxinjie opened this issue Oct 31, 2019 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@wongxinjie
Copy link
Contributor

  1. Please describe the issue you observed:

    • What did you do (The steps to reproduce)?
      I create a consumer using Aliyun RocketMQ service, if I just subscribe one topic in one consumer or start one consumer in one process, it works normally. But when it comes to subscribe multiple topics in one consumer or start multiple consumers in one process, it just prints the starting log and hangs.

    • What did you expect to see?
      Subscribe multiple topics could work normally.

    • What did you see instead?

  2. Please tell us about your environment:

    • What is your OS?
      ubuntu 18.04

    • What is your client version?
      native

    • What is your RocketMQ version?
      lastest

@wenfengwang wenfengwang self-assigned this Oct 31, 2019
@wenfengwang wenfengwang added the bug Something isn't working label Oct 31, 2019
@wenfengwang wenfengwang added this to the Native-2.0.0-alpha3 milestone Oct 31, 2019
@ShannonDing
Copy link
Member

link #242

@wongxinjie
Copy link
Contributor Author

link #242

nope, I try but the PR didn't fix the bug.

@wolftankk
Copy link
Contributor

wolftankk commented Nov 1, 2019

link #242

nope, I try but the PR didn't fix the bug.

In the RocketMQ admin consumer page, u try to find where this group is in? and detail log for it.

ps:
#194 (comment)

you can try it, maybe slove.

@xujianhai666
Copy link
Member

strange, I run native version online, everything is okay. could u write an example for us? thx a lot @wongxinjie

@wenfengwang
Copy link
Member

I reproduce the situation and found many unexpected cases of below

Subscribe 2 topics in a consumer

Case 1: nothing received, maybe hang
Case 2: received only one topic messages, another can't receive
Case 3: all received.

Start 2 consumers in a process

Case 4: one consumer received and another not
Case 5: one consumer received and another not, and broker response to Code: 24
image

Case 6: all can't receive messages

@wenfengwang
Copy link
Member

I reproduce the situation and found many unexpected cases of below

Subscribe 2 topics in a consumer

Case 1: nothing received, maybe hang
Case 2: received only one topic messages, another can't receive
Case 3: all received.

Start 2 consumers in a process

Case 4: one consumer received and another not
Case 5: one consumer received and another not, and broker response to Code: 24
image

Case 6: all can't receive messages

I will try to fix these

@wenfengwang
Copy link
Member

fixed at: #310

@wenfengwang
Copy link
Member

wenfengwang commented Nov 26, 2019

@wongxinjie In RocketMQ, it is not allowed that create multiple consumers have the same consumerGroup in one client Instance. If you want to create multiple consumers have the same consumerGroup in one process, you should make sure for unique ClientID by calling WithInstance when create consumer instance.

After fixing, it may work well that subscribe multiple topics in one consumer and create multiple consumers that have different consumerGroup in one client instance, welcome have a test :)

ShannonDing pushed a commit that referenced this issue Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants