Skip to content

Instantly share code, notes, and snippets.

View Reasno's full-sized avatar

谷溪 Reasno

View GitHub Profile

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.

  1. Reset the consumer offset for a topic (preview)
@Reasno
Reasno / downgradeRetryPolicy.js
Created August 13, 2019 02:26 — forked from harigist/downgradeRetryPolicy.js
Downgrade Retry policies in Cassandra using nodejs
/**
* DowngradeRetryPolicy - This module is used to retry the READ / WRITE operation
* by downgrading the value of consistency to minimum value.
* @constructor
*/
function DowngradeRetryPolicy() {
}
// Inherit the retry policy
util.inherits(DowngradeRetryPolicy, RetryPolicy);