Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mariusneo
mariusneo / Kafka Streams Topology Test with inspection of the record metadata
Created August 6, 2019 05:31
Simple wordcount kafka stream topology test on which it is inspected the timestamp of each consumer record passing through the topology
import org.apache.kafka.clients.consumer.ConsumerConfig
import org.apache.kafka.clients.producer.ProducerRecord
import org.apache.kafka.common.serialization.Serdes
import org.apache.kafka.streams.KeyValue
import org.apache.kafka.streams.StreamsBuilder
import org.apache.kafka.streams.StreamsConfig
import org.apache.kafka.streams.Topology
import org.apache.kafka.streams.TopologyTestDriver
import org.apache.kafka.streams.kstream.KStream
@mariusneo
mariusneo / Kafka Streams Topology Test
Created August 6, 2019 04:43
Simple Kafka Streams Word Count Topology Test written in Kotlin
import org.apache.kafka.clients.consumer.ConsumerConfig
import org.apache.kafka.clients.producer.ProducerRecord
import org.apache.kafka.common.serialization.Serdes
import org.apache.kafka.streams.StreamsBuilder
import org.apache.kafka.streams.StreamsConfig
import org.apache.kafka.streams.Topology
import org.apache.kafka.streams.TopologyTestDriver
import org.apache.kafka.streams.kstream.Produced
import org.apache.kafka.streams.test.ConsumerRecordFactory
@mariusneo
mariusneo / gist:1341600
Created November 5, 2011 14:43
UL Style Problem
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>UL Style Problem</title>
<style type="text/css">
ul.search-inputs li label {
width: 100%;
@mariusneo
mariusneo / markers.html
Created November 4, 2011 07:43
Searching for markers
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Adding Markers to the Google Map</title>
<link
href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css"
rel="stylesheet" type="text/css" />