Example Applications for Stark & Wayne kStreams™ for PCF

The Cloud Foundry community and Kafka users have created some example applications that can bind to Stark & Wayne kStreams™ service credentials for an Apache Kafka topic.

Language Source Code
Java / Spring

Credentials

The connection details are provided via $VCAP_SERVICES environment variable.

Topic Plan

For the topic service plan, an example of the credentials section will be:

json
{
    "zkPeers": "10.213.10.31:2181,10.213.10.32:2181,10.213.10.33:2181",
  "hostname": "10.213.10.35:9092,10.213.10.36:9092,10.213.10.34:9092",
  "topicName": "67f85c81-ee6f-4791-b169-864f2e18d929",
  "uri": "kafka://10.213.10.35:9092,10.213.10.36:9092,10.213.10.34:9092/67f85c81-ee6f-4791-b169-864f2e18d929"
}

Shared Plan

For the shared service plan, an example of the credentials section will be:

json
{
    "zkPeers": "10.213.10.31:2181,10.213.10.32:2181,10.213.10.33:2181",
  "hostname": "10.213.10.35:9092,10.213.10.36:9092,10.213.10.34:9092",
  "topicNamePrefix": "67f85c81-ee6f-4791-b169-864f2e18d929",
  "uri": "kafka://10.213.10.35:9092,10.213.10.36:9092,10.213.10.34:9092"
}

When using the shared plan, create Kafka Topics using the topicNamePrefix as the prefix for all your topic names. This will allow cf delete-service to find and delete all the topics you have created.

Create a pull request or raise an issue on the source for this page in GitHub