lib/api.js
function(params, cb) {
    var correlationId = _cbt.put(offCommitResponse(cb));
    var msg = envelope(offCommit.encode()
                                .correlation(correlationId)
                                .client(_options.clientId)
                                .group(params.group)
                                .topic(params.topic)
                                .partition(params.partition)
                                .offset(params.offset)
                                // .when(params.when) //disabled in api ver1
                                .meta(params.meta)
                                .end());

    sendMsg(msg, correlationId, cb);
  }
function(params, cb) {
    var correlationId = _cbt.put(offCommitResponse(cb));
    var msg = envelope(offCommit.encode()
                                .correlation(correlationId)
                                .client(_options.clientId)
                                .group(params.group)
                                .topic(params.topic)
                                .partition(params.partition)
                                .offset(params.offset)
                                // .when(params.when) //disabled in api ver1
                                .meta(params.meta)
                                .end());

    sendMsg(msg, correlationId, cb);
  }
function ( params , cb ) { var correlationId = _cbt . put ( offCommitResponse ( cb ) ) ; var msg = envelope ( offCommit . encode ( ) . correlation ( correlationId ) . client ( _options . clientId ) . group ( params . group ) . topic ( params . topic ) . partition ( params . partition ) . offset ( params . offset ) // .when(params.when) //disabled in api ver1 . meta ( params . meta ) . end ( ) ) ; sendMsg ( msg , correlationId , cb ) ; }
write a commit request to kafka

params:
group: the consumer group id
topic: the topic to commit on
partition: the partition to commit on
offset: the offset to commit
write a commit request to kafka