Skip to content

Instantly share code, notes, and snippets.

View fhussonnois's full-sized avatar

Florian Hussonnois fhussonnois

View GitHub Profile
@fhussonnois
fhussonnois / example-file-pulse-log4j.properties
Created January 22, 2020 11:41
example-file-pulse-log4j.properties
# List of aliases for the filter chain, specifying the order in which the filters will be applied.
filters=GroupMultilineException, ParseLog4jLog
# Configuration for the filter with alias 'GroupMultilineException'
filters.GroupMultilineException.negate=false
filters.GroupMultilineException.pattern="^[\\t]"
filters.GroupMultilineException.type=io.streamthoughts.kafka.connect.filepulse.filter.MultiRowFilter
# Configuration for the filter with alias 'ParseLog4jLog'
filters.ParseLog4jLog.match="%{TIMESTAMP_ISO8601:logdate} %{LOGLEVEL:loglevel} %{GREEDYDATA:message}"
@fhussonnois
fhussonnois / .java
Created November 26, 2019 20:26
Kafka Streams WordCount Example
package example;
import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.streams.KafkaStreams;
import org.apache.kafka.streams.StreamsBuilder;
import org.apache.kafka.streams.Topology;
import org.apache.kafka.streams.kstream.KStream;
import org.apache.kafka.streams.kstream.Materialized;
import org.apache.kafka.streams.kstream.Produced;
{"namespace": "example.avro",
"type": "record",
"name": "User",
"fields": [
{"name": "name", "type": "string"},
{"name": "favorite_number", "type": ["int", "null"]},
{"name": "favorite_color", "type": ["string", "null"]}
]
}