10 min read

New StreamNative Academy Course: Getting Started with Kafka on StreamNative (KSN) for Kafka Developers

Dustin Nest
Technical Trainer, StreamNative

Introduction

Kafka developers can quickly start using StreamNative Cloud clusters for their streaming needs using Kafka on StreamNative (KSN). While this blog post doesn’t focus on the many benefits of using Pulsar clusters over Kafka clusters, the list is lengthy, and the benefits are significant. If you’re interested in learning more, check out Optimize and Scale: How Kafka-on-StreamNative Transforms Your Data Streaming Platform.

Instead, in this blog post, we focus on how a Kafka Developer can get started using a StreamNative Cloud cluster as quickly as possible with their existing Kafka code. KSN embeds the Kafka protocol directly inside the Pulsar broker, allowing KSN-enabled StreamNative Pulsar clusters to support existing Kafka workloads.

How do I start testing Kafka code against a KSN-enabled StreamNative Pulsar cluster?

StreamNative Academy provides Kafka developers with three options for getting started testing Kafka code against a KSN-enabled StreamNative Pulsar cluster:

  1. Recommended Get immediate and free access to StreamNative Academy’s Getting Started with Kafka on StreamNative (KSN) for Kafka Developers. To complete the hands-on exercises, request access to a free coding environment with pre-loaded code examples to be tested against a training cluster. Access to the coding environment is typically granted within one business day. You will have access to the environment for one week.
  2. Get free access to the course, but create your own free StreamNative Hosted cluster at streamnative.io for testing KSN using $200 credit. The course includes detailed directions on creating a service account, creating a tenant and namespaces, and applying permissions required for KSN. This process should take only 15 minutes to complete. Use this option to test your own Kafka code.
  3. Just want to browse the course videos? View course content on StreamNative Academy’s YouTube Channel.

The short course includes ~3-4 hours of training content.

1. Enroll in StreamNative Academy’s free short course Getting Started with Kafka on StreamNative (KSN) for Kafka Developers and request access to the coding environment and training cluster

Upon registering for the course, you will be granted immediate access to the following training content using the Kafka Java Client:

  • Convert an existing client.properties file to use Pulsar JWT Tokens or StreamNative API-Keys to connect to a KSN-enabled StreamNative Hosted Pulsar cluster.
  • Convert an existing client.properties file to use OAuth2.
  • Connect to the KSN Kafka protocol handler for producing and consuming messages and register schemas using the Kafka schema registry.
  • In addition to using a client.properties file, code samples are also provided for configuring cluster connections directly in your Java code (JWT Token and OAuth2, for both protocol handler and schema registry).
  • Code samples tested during the course include producing and consuming messages, transactions, and KStreams. Further information for topic partitioning, compaction, and message retention is also provided.
  • In addition, you will have an opportunity to try KSN’s support for multi-tenancy and enable geo-replication to a second StreamNative Hosted Pulsar cluster by executing just one command.

To complete the hands-on exercises, we encourage you to request access to the free coding environment and cluster access. Access is provided for one week and includes the following (access is typically granted within one business day):

  • Preconfigured web-based coding environment with code samples to complete the hands-on exercises mentioned above.
  • Tenant access in a StreamNative Hosted Pulsar cluster to complete all hands-on exercises. All required permissions are preconfigured for you.
  • You will have access to StreamNative’s Technical Trainer during the course.

After completing the short course, you will receive a certificate of completion and a badge for LinkedIn.

If you wish to test your own Kafka code, please use Option 2 below by creating your own StreamNative Hosted Pulsar cluster.

2. Enroll in the free short course, but create your own StreamNative Hosted Pulsar cluster for testing KSN using a $200 credit

Want to test your own Kafka code against a StreamNative Hosted Pulsar cluster? StreamNative provides a $200 credit for creating your own StreamNative Hosted Pulsar cluster for testing. How will I convert my existing Kafka code to connect to the StreamNative Hosted Pulsar cluster? Skip to the part of the course that most closely resembles your existing Kafka code:

  • Since you’re working in your own StreamNative Hosted Pulsar cluster, directions are provided on how to create a service account and obtain any needed security tokens or keys.
  • Use JWT or Oauth2 to connect to the Kafka protocol handler or Kafka schema registry of the cluster you created. It’s your choice. We have code examples for both and directions on obtaining all the relevant endpoints from the console.
  • Code examples are provided for configuring permissions using a client.properties file or directly in your Java code.
  • If you would like to test KSN support for multi-tenancy, directions are provided on creating tenants, namespaces, and all required permissions.
  • Since you’ll be using your own StreamNative Hosted Pulsar cluster, we won’t provide tenant access in our training cluster or one week's access to the preconfigured coding environment. What if you still want one week of access to the coding environment or our coding samples? Just ask! Coding example are available for download in the course and can be easily installed into your local IDE. If you request access to the pre-loaded coding environment, directions are included in the course to point this to your StreamNative Hosted Pulsar cluster.

Since there is no way to check for course completion, you will not be provided a certificate of completion or badge for LinkedIn after completing the short course when using your own StreamNative Hosted Pulsar cluster.

3. View course content on StreamNative Academy’s YouTube Channel

The short course videos are available on StreamNative Academy’s YouTube Channel. Feel free to browse the video content to see how easy it is to convert an existing Kafka application to KSN. View the video descriptions for relevant code snippets showcased in each video.

As an example, the first exercise of the course, Connect Existing Kafka Application to Kafka on StreamNative, start with the simplest example of connecting to KSN with a JWT Token. In this first example, only the URL and sasl.jaas.config of client.properties must be edited to start publishing messages to KSN.

url=ksn endpoint

sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username='public/default' password='token:<token>';

If you plan on testing KSN, we highly recommend enrolling in the free short course. Course access includes access to StreamNative’s Technical Trainer.

Free Course Access

Get free and immediate access to the course here.

For Option 1 (Recommended), contact training-help@streamnative.io to request your free coding environment and cluster access. Access is typically granted within one business day. You will have access to the coding environment and cluster for one week.

For Option 2, sign up for the course and spin up your own StreamNative Pulsar cluster, using the course content to apply the required permissions. Contact training if you would like access to a pre-configured coding environment. Code examples are provided in the course.

Dustin Nest
Orchestrator of aha! moments by developing and executing interactive software training. Chemical Engineering PhD background provides for unique perspective training industrial clients.

Newsletter

Our strategies and tactics delivered right to your inbox

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Kafka