This is the source code of EventHubsReceiver for Spark Streaming.
Here is an example project that uses EventHubsReceiver to count and persist messages from Azure Eventhubs.
<!-- https://mvnrepository.com/artifact/com.microsoft.azure/spark-streaming-eventhubs_2.11 -->
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>spark-streaming-eventhubs_2.11</artifactId>
<version>2.0.0</version>
</dependency>
// https://mvnrepository.com/artifact/com.microsoft.azure/spark-streaming-eventhubs_2.11
libraryDependencies += "com.microsoft.azure" % "spark-streaming-eventhubs_2.11" % "2.0.0"
https://mvnrepository.com/artifact/com.microsoft.azure/spark-streaming-eventhubs_2.11/2.0.0
In order to build and run the examples, you need to have:
- Java 1.8 SDK.
- Maven 3.x
- Scala 2.11
mvn clean
mvn package
This command builds and installs EventHubsReceiver jar to local maven cache. Subsequently you can build any Spark Streaming application that references this jar.