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

multiple clients #114

Open
jney opened this issue Apr 30, 2020 · 7 comments
Open

multiple clients #114

jney opened this issue Apr 30, 2020 · 7 comments
Labels

Comments

@jney
Copy link

jney commented Apr 30, 2020

Hi. Probably a misunderstanding, but I thought that if I had multiple consumers, they will read distinct messages from queue. But it appears that are reading same messages.
How could I achieve this?

@jney jney changed the title multiple client multiple clients Apr 30, 2020
@harlow
Copy link
Owner

harlow commented May 5, 2020

Correct the library currently doesn’t support consumer groups (that auto balance shards)

It’s supports two strategies:

  1. Consumer scans all shards
  2. Consumer scans single shard (you must provide the shard ID)

@anton-pfc
Copy link

@harlow Do I understand correctly that it's impossible to consume a message only once if I'm running 10 instances? Currently what I observe in my tests - if I run 10 instances with the same appName - every message is consumed 10 times. Do you know a workaround for that? How did you implement "at-least-once" semantic in you system?

@harlow
Copy link
Owner

harlow commented May 30, 2020

@anton-pfc sorry if there is confusion here; there isn't a way to run 10 consumer apps all with Scan func and not have them all consume the same records.

If you want to run 10 instances you'll need to pass the shardID to each of the individual consumers with the ScanShard func

the Scan func will automatically scan all shards from the given checkpoint

@thestephenstanton
Copy link

@harlow Out of curiosity, was there a reason you didn't implement a way for this thing to be able to run multiple clients looking at the same stream? And basically "gossip" via the store to see who has what shard? I know it is easier said than done, just curious if there was really more to it and it wasn't worth it.

@ckatsaras-godaddy
Copy link

Curious if anyone has an update on this issue . @thestephenstanton, did you happen to figure out a solution to this problem?

@thestephenstanton
Copy link

@ckatsaras-godaddy we ended up switching to Kafka and inherited a new set of problems lol. So I never figure out how to do this.

@ckatsaras-godaddy
Copy link

Ah, I see! Thanks for getting back to me so quickly! 😄

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

5 participants