smartcat-labs / cassandra-diagnostics

Cassandra Node Diagnostics Tools
Apache License 2.0
51 stars 6 forks source link

Kafka reporter publishing format towards Sentinel #228

Closed nivancevic closed 7 years ago

nivancevic commented 7 years ago

Currently Kafka reporter publish measurements like this:

properties.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());
properties.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());
producer = new KafkaProducer<>(properties);
partitionKey = Utils.getHostname();
producer.send(new ProducerRecord<>(measurement.name(), partitionKey, measurement.toJson()));

The problem is that kafka reporter can send measurements to an arbitrary topic. In case Sentinel has a single topic for accepting measurements, what partitioning should be optimal?

nivancevic commented 7 years ago

Covered by #220