anchor.diff:      false -> false
     end.
   
  -exec_callback(Callback, undefined, MessageSet) ->
  -  Callback(MessageSet);
  -exec_callback(undefined, Callback3, #message_set{messages = Messages}) ->
  -  F = fun(#message{key = K, value = V, offset = Offset}) ->
  -          Callback3(K, V, Offset)
  -      end,
  -  lists:foreach(F, Messages).
  +exec_callback(Callback, MessageSet) ->
  +  case erlang:fun_info(Callback, arity) of
  +    {arity, 1} ->
  +      Callback(MessageSet);
  +    {arity, 3} ->
  +      F = fun(#message{key = K, value = V, offset = Offset}) ->
  +              Callback(K, V, Offset)
  +          end,
  +      lists:foreach(F, MessageSet#message_set.messages)
  +  end.
   
   do_debug(Pid, Debug) ->
     {ok, #socket{pid = Sock}} = get_socket(Pid),
  
positive.code:       {stop, {broker_error, Error}, State0};
      {ok, State} ->
        MessageSet = brod_utils:fetch_response_to_message_set(R),
        exec_callback(State#state.callback, State#state.callback3, MessageSet),
        ok = send_fetch_request(State),
        {noreply, State};
      {empty, State} ->
  
negative.code:     {error, Error} ->
        {reply, {error, Error}, State0};
      {ok, Offset} ->
        State = State0#state{ callback      = Callback
                            , offset        = Offset
                            , max_wait_time = MaxWaitTime
                            , min_bytes     = MinBytes
                            , max_bytes     = MaxBytes},
        ok = send_fetch_request(State),
        {reply, ok, State}
    end;
  