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

Hotfix/set offset bug #73

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dayenda
Copy link

@dayenda dayenda commented Sep 14, 2015

There is a bug in the consumer class that makes it impossible to set partition offset if the consumer is under load.

foreach (var message in response.Messages)
   {
      _fetchResponseQueue.Add(message, _disposeToken.Token);    <-- Will block if queue is full

      if (_disposeToken.IsCancellationRequested) return;
   }

var nextOffset = response.Messages.Max(x => x.Meta.Offset) + 1;
_partitionOffsetIndex.AddOrUpdate(partitionId, i => nextOffset, (i, l) => nextOffset);   <-- Will overwrite any offset set by client while blocking above

I have changed the offset collection to include a boolean that indicates if the offset was set from outside the worker task.

@initialBoy
Copy link

How to send synchronization data? I need your help!!

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

Successfully merging this pull request may close these issues.

2 participants