Skip to content

Commit bd02343

Browse files
authored
Merge branch 'main' into using-s4j-guide
2 parents 58c5db3 + 69216c2 commit bd02343

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

modules/use-cases-architectures/pages/starlight/index.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
:page-aliases: starlight::index.adoc,starlight-suite::index.adoc
55
:navtitle: Starlight Extensions
66

7-
The Starlight suite of extensions are a collection of Apache Pulsar protocol handlers that extend an existing Pulsar cluster. The goal of all the extensions are to create a native, seamless interaction with a Pulsar cluster using existing tooling and clients.
7+
The Starlight suite of extensions is a collection of Apache Pulsar protocol handlers that extend an existing Pulsar cluster.
8+
The goal of all the extensions is to create a native, seamless interaction with a Pulsar cluster using existing tooling and clients.
89

910
== Starlight for Kafka
1011

modules/use-cases-architectures/pages/starlight/kafka/index.adoc

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@ image:s4k-architecture.png[Starlight for Kafka Architecture]
1616

1717
== Establishing the Kafka protocol handler
1818

19-
Before you can use a Kafka client can interact with your Pulsar cluster, you need the Starlight for Kafka protocol handler installed in the cluster. Installation looks a bit different depending on where your Pulsar cluster is running. Choose the option that best fits your needs.
19+
Before a Kafka client can interact with your Pulsar cluster, you need the Starlight for Kafka protocol handler installed in the cluster.
20+
Installation looks a bit different depending on where your Pulsar cluster is running.
21+
Choose the option that best fits your needs.
2022

2123
[tabs]
2224
====
2325
Astra Streaming::
2426
+
2527
--
2628
27-
If you want a working Kafka extension as quickly as possible, this is your best bet. This is also a good option for those that already have a streaming tenant and are looking to extend it.
29+
If you want a working Kafka extension as quickly as possible, this is your best bet.
30+
This is also a good option for those that already have a streaming tenant and are looking to extend it.
2831
2932
. Sign in to your Astra account and navigate to your streaming tenant.
3033
+
@@ -41,7 +44,7 @@ image:enable-kafka-button.png[Astra Streaming enable kafka]
4144
. A message will let you know of the additions (and restrictions) that come with using Starlight for Kafka.
4245
image:enable-kafka-message.png[Astra Streaming enable kafka message]
4346
44-
. Click the "Enable Kafka" button to confirm your understanding.
47+
. Select the "Enable Kafka" button to confirm your understanding.
4548
4649
Your Astra Streaming tenant is ready for prime time! Continue to the next section of the guide to see it in action.
4750
--
@@ -53,21 +56,24 @@ The Starlight for Kafka extension is included in the `luna-streaming-all` image
5356
Self Managed::
5457
+
5558
--
56-
Already got your own Pulsar Cluster? Or maybe your using a standalone cluster? Starlight for Kafka can easily be a part of that cluster! Follow the "xref:starlight-for-kafka:installation:starlight-kafka-quickstart.adoc[]" guide.
59+
Already have your own Pulsar cluster? Or maybe you're using a standalone cluster? Starlight for Kafka can easily be a part of that cluster! Follow the "xref:starlight-for-kafka:installation:starlight-kafka-quickstart.adoc[]" guide.
5760
--
5861
====
5962

6063
== Messaging with Starlight for Kafka
6164

62-
Starlight for Kafka supports quite a few different use cases. With a Pulsar cluster between producers and consumers you can interchange the type of producer and consumer to fit your needs. *The below examples are using an Astra Streaming tenant as the Kafka bootstrap server.* If you are using Luna or self-managed, switch the bootstrap server URL for your own.
65+
Starlight for Kafka supports quite a few different use cases. With a Pulsar cluster between producers and consumers you can interchange the type of producer and consumer to fit your needs.
66+
67+
*The below examples are using an Astra Streaming tenant as the Kafka bootstrap server.* If you are using Luna Streaming or a self-managed tenant, switch the bootstrap server URL for your own.
6368

6469
=== Retrieve Kafka connection properties in Astra Streaming
6570

66-
While on the "Connect" tab in the Astra Streaming portal, the "kafka" area will provide important connection information. You will need that to create a working Kafka client or using the CLI.
71+
In the Astra Streaming portal "Connect" tab, the "kafka" area provides important connection information.
72+
You will need this connection information to create a working Kafka client or use the CLI.
6773

6874
image:kafka-client-settings.png[Astra Streaming kafka settings]
6975

70-
TIP: While reviewing the Kafka connection settings in the Astra portal, if you click the clipboard icon you will get those values as well as a working token to paste in code.
76+
TIP: Click the clipboard icon to copy the Kafka connection values, as well as a working token to paste in code.
7177

7278
=== Produce and consume a message
7379

@@ -76,7 +82,8 @@ TIP: While reviewing the Kafka connection settings in the Astra portal, if you c
7682
Kafka CLI::
7783
+
7884
--
79-
Download the latest Kafka dist https://www.apache.org/dyn/closer.cgi?path=/kafka/3.3.1/kafka_2.13-3.3.1.tgz[here^]{external-link-icon}. With the tar ball extracted, the producer and consumer cli's are in the 'bin' folder.
85+
Download the latest Kafka distribution https://www.apache.org/dyn/closer.cgi?path=/kafka/3.3.1/kafka_2.13-3.3.1.tgz[here^]{external-link-icon}.
86+
With the tarball extracted, the producer and consumer CLIs are in the 'bin' folder.
8087
8188
. To get started, let's set a few variables. If you've completed our "xref:astra-streaming:getting-started:index.adoc[Getting started with Astra Streaming]" guide, the below values will be a perfect fit for your existing tenant.
8289
+
@@ -88,23 +95,21 @@ NAMESPACE="<REPLACE_WITH_NAMESPACE>"
8895
TOPIC="<REPLACE_WITH_TOPIC>"
8996
----
9097
91-
. Now let's use those variables to enter in Kafka's producer shell.
98+
. Now let's enter those variables in Kafka's producer shell.
9299
+
93100
[source,shell]
94101
----
95102
# cd kafka_2.13-3.3.1
96103
./bin/kafka-console-producer.sh --topic "$TENANT/$NAMESPACE/$TOPIC" --bootstrap-server "$SERVICE_URL"
97104
----
98105
99-
. Type in a super memorable messages and hit 'enter' to send. Press 'Ctrl-C' to exit the shell.
106+
. Type in a super memorable message and hit 'enter' to send. Press 'Ctrl-C' to exit the shell.
100107
+
101108
[source,shell]
102109
----
103110
> This is my first S4K message.
104111
----
105-
106112
A new message has been produced in the provided tenant/namespace/topic and is ready for consumption.
107-
108113
. Start the Kafka consumer shell.
109114
+
110115
[source,shell]
@@ -122,16 +127,17 @@ This is my first S4K message.
122127
123128
. Press 'Ctrl-C' to exit the consumer shell.
124129
125-
Wow, you did it! Kafka producer and consumer with an Apache Pulsar cluster. How about trying the Java client now?
130+
Wow, you did it! A Kafka producer and consumer with an Apache Pulsar cluster. How about trying the Java client now?
126131
--
127132
Kafka Client (Java)::
128133
+
129134
--
130-
This example uses maven as the project structure. If you prefer gradle or another, this code should still be a good fit.
135+
This example uses Maven for the project structure.
136+
If you prefer Gradle or another tool, this code should still be a good fit.
131137
132-
TIP: Visit our https://github.com/datastax/astra-streaming-examples[examples repo^]{external-link-icon} to see the complete source of this example.
138+
TIP: Visit our https://github.com/datastax/astra-streaming-examples[examples repo^]{external-link-icon} to see the complete source for this example.
133139
134-
. Create a new maven project.
140+
. Create a new Maven project.
135141
+
136142
[source,shell]
137143
----
@@ -187,7 +193,7 @@ mvn clean package assembly:single
187193
java -jar target/StarlightForKafkaClient-1.0-SNAPSHOT-jar-with-dependencies.jar
188194
----
189195
190-
. If all goes as it should your output will be similar to this:
196+
. If all goes as it should, your output will be similar to this:
191197
+
192198
[source,shell]
193199
----

0 commit comments

Comments
 (0)