September 2018
Intermediate to advanced
398 pages
9h 43m
English
In this section, we are going to write a program that produces a stream of the BTC/USD transactions that happen in real time. Our program will:
Subscribe to the WebSocket API of Bitstamp to get a stream of transactions in JSON format.
For each transaction coming in the stream, it will:
Deserialize it
Convert it to the same Transaction case class that we used in BatchProducer in the previous chapter
Serialize it
Send it to a Kafka topic
In the next section, we will use Zeppelin again with Spark Streaming to query the data streamed to the Kafka topic.
Read now
Unlock full access