mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
inlet/kafka: use a 4-byte random value for key
Using the exporter IP address is not helpful at all as we may not have many of them and it would make big exporters difficult to scale if one thread is not enough to ingest on the ClickHouse side. Fix #75
This commit is contained in:
@@ -26,9 +26,9 @@ func TestKafka(t *testing.T) {
|
||||
defer close(received)
|
||||
expected := sarama.ProducerMessage{
|
||||
Topic: "flows-v2",
|
||||
Key: sarama.StringEncoder("127.0.0.1"),
|
||||
Key: got.Key,
|
||||
Value: sarama.ByteEncoder("hello world!"),
|
||||
Partition: 30,
|
||||
Partition: got.Partition,
|
||||
}
|
||||
if diff := helpers.Diff(got, expected); diff != "" {
|
||||
t.Fatalf("Send() (-got, +want):\n%s", diff)
|
||||
|
||||
Reference in New Issue
Block a user