August 2017
Beginner to intermediate
278 pages
6h 40m
English
The fraud detection application will be running continuously, and you can run as many instances as you want; Kafka will do the load balancing for you. Let's look at the following code that reads the input from the iprecord topic and then filters out records that are fraud using the lookup service:
package com.packt.Kafka;import com.packt.Kafka.lookup.CacheIPLookup;import com.packt.Kafka.utils.PropertyReader;import org.apache.Kafka.common.serialization.Serde;import org.apache.Kafka.common.serialization.Serdes;import org.apache.Kafka.Streams.KafkaStreams;import org.apache.Kafka.Streams.StreamsConfig;import org.apache.Kafka.Streams.kStream.KStream;import org.apache.Kafka.Streams.kStream.KStreamBuilder;import java.util.Properties; ...
Read now
Unlock full access