cleanup
This commit is contained in:
@@ -30,6 +30,7 @@ func ClickstreamProtobufEventHandler(request RequestObject, topic string) {
|
||||
|
||||
messageBytes := request.Body
|
||||
|
||||
// to be of the format [magicByte] + [schemaID] + [messageIndex] + [value]
|
||||
recordValue := []byte{}
|
||||
|
||||
// add [magicByte]
|
||||
@@ -44,8 +45,7 @@ func ClickstreamProtobufEventHandler(request RequestObject, topic string) {
|
||||
messageIndexBytes := []byte{byte(2), byte(0)}
|
||||
recordValue = append(recordValue, messageIndexBytes...)
|
||||
|
||||
// Now write the bytes from the actual value...
|
||||
// valueBytes, _ := proto.Marshal(&sensorReading)
|
||||
// Now write the bytes from the actual message...
|
||||
recordValue = append(recordValue, messageBytes...)
|
||||
|
||||
message := &sarama.ProducerMessage{
|
||||
@@ -53,10 +53,6 @@ func ClickstreamProtobufEventHandler(request RequestObject, topic string) {
|
||||
Value: sarama.ByteEncoder(recordValue),
|
||||
}
|
||||
|
||||
if message != nil {
|
||||
log.Printf("WRITING TO KAFKA")
|
||||
}
|
||||
|
||||
producer_module.WriteMessageToKafkaAsync(message)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user