You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/use-cases-architectures/pages/starlight/rabbitmq/index.adoc
+38-19Lines changed: 38 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,22 @@
4
4
:title: Getting started with the Starlight for RabbitMQ extension
5
5
:navtitle: Starlight for RabbitMQ
6
6
7
-
Starlight for RabbitMQ acts as a proxy between your https://www.rabbitmq.com/[RabbitMQ^]{external-link-icon} application and https://pulsar.apache.org/[Apache Pulsar™^]{external-link-icon} cluster. It implements the AMQP 0.9.1 protocol used by RabbitMQ clients and translates AMQP frames and concepts to Pulsar ones.
7
+
Starlight for RabbitMQ acts as a proxy between your https://www.rabbitmq.com/[RabbitMQ^]{external-link-icon} application and https://pulsar.apache.org/[Apache Pulsar™^]{external-link-icon} cluster.
8
+
It implements the AMQP 0.9.1 protocol used by RabbitMQ clients and translates AMQP frames and concepts to Pulsar concepts.
8
9
9
10
If source code is your thing, visit the https://github.com/datastax/starlight-for-rabbitmq[project's repo on GitHub^]{external-link-icon}.
10
11
11
12
== Architecture reference
12
13
13
-
If you would like to get deep into how Starlight for RabbitMQ works, xref:starlight-for-rabbitmq:ROOT:index.adoc[read the docs].
14
+
If you want to dive deep into how Starlight for RabbitMQ works, xref:starlight-for-rabbitmq:ROOT:index.adoc[read the documentation].
14
15
15
16
image:s4r-architecture.png[Starlight for RabbitMQ Architecture]
16
17
17
18
== Establishing the RabbitMQ protocol handler
18
19
19
-
Before you can use a RabbitMQ client to interact with your Pulsar cluster, you need the Starlight for RabbitMQ 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.
20
+
Before you can use a RabbitMQ client to interact with your Pulsar cluster, you need the Starlight for RabbitMQ protocol handler installed in the cluster.
21
+
Installation looks a bit different depending on where your Pulsar cluster is running.
22
+
Choose the option that best fits your needs.
20
23
21
24
[tabs]
22
25
====
@@ -52,21 +55,25 @@ The Starlight for RabbitMQ extension is included in the `luna-streaming-all` ima
52
55
Self Managed::
53
56
+
54
57
--
55
-
Already got your own Pulsar Cluster? Or maybe your using a standalone cluster? Starlight for RabbitMQ can easily be a part of that cluster! Follow the "xref:starlight-for-rabbitmq:installation:getting-started.adoc[]" guide.
58
+
Already have your own Pulsar Cluster? Or maybe you're using a standalone cluster? Starlight for RabbitMQ can easily be a part of that cluster! Follow the "xref:starlight-for-rabbitmq:installation:getting-started.adoc[]" guide.
56
59
--
57
60
====
58
61
59
62
== Messaging with Starlight for RabbitMQ
60
63
61
-
Starlight for RabbitMQ supports quite a few different use cases. With a Pulsar cluster between publishers and consumers you can interchange the type of publisher and consumer to fit your needs. *The below examples are using an Astra Streaming tenant as the AMQP listener.* If you are using Luna or self-managed, switch the listener URL for your own.
64
+
Starlight for RabbitMQ supports quite a few different use cases.
65
+
With a Pulsar cluster between publishers and consumers you can interchange the type of publisher and consumer to fit your needs.
66
+
67
+
*The below examples are using an Astra Streaming tenant as the AMQP listener.* If you are using Luna Streaming or a self-managed tenant, switch the listener URL for your own.
62
68
63
69
=== Retrieve RabbitMQ connection properties in Astra Streaming
64
70
65
-
While on the "Connect" tab in the Astra Streaming portal, the "RabbitMQ" area will provide important connection information. You will need that to create a working RabbitMQ client or using the CLI.
71
+
In the Astra Streaming portal "Connect" tab, the "RabbitMQ" area provides important connection information.
72
+
You will need this connection information to create a working RabbitMQ client or use the CLI.
TIP: While reviewing the RabbitMQ 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 RabbitMQ connection values, as well as a working token to paste in code.
70
77
71
78
=== Produce and consume a message
72
79
@@ -75,18 +82,19 @@ TIP: While reviewing the RabbitMQ connection settings in the Astra portal, if yo
75
82
RabbitMQ Client (Java)::
76
83
+
77
84
--
78
-
This example uses maven as the project structure. If you prefer gradle or another, this code should still be a good fit.
85
+
This example uses Maven for the project structure.
86
+
If you prefer Gradle or another tool, this code should still be a good fit.
79
87
80
-
TIP: Visit our https://github.com/datastax/astra-streaming-examples[examples repo^]{external-link-icon} to see the complete source of this example.
88
+
TIP: Visit our https://github.com/datastax/astra-streaming-examples[examples repo^]{external-link-icon} to see the complete source for this example.
. Open the file "src/main/java/org/example/App.java" and replace the entire contents with the below code. Notice there are class variables that need replacing. Apply the values previously retrieved in Astra Streaming.
108
+
. Open the file "src/main/java/org/example/App.java" and replace the entire contents with the below code.
109
+
Notice there are class variables that need replacing.
110
+
Apply the values previously retrieved in Astra Streaming.
. Paste the consumer code into the file. This creates a basic consumer with callback on message receipt. Because the consumer isn't a blocking thread, we'll sleep for a few seconds and let things process.
134
+
. Add the consumer code to the file.
135
+
This creates a basic consumer with callback on message receipt.
136
+
Because the consumer isn't a blocking thread, we'll sleep for a few seconds and let things process.
0 commit comments