Skip to content

Commit 32bb57c

Browse files
authored
DOC-4604 Centralize Starlight for JMS quickstarts from Astra Streaming, Streaming Learning, and Luna Streaming (#18)
* bring over JMS, edit related links, headings * unify nav, apply attributes * navtitles and more attributes * combine 2 jms quickstarts * edit pom * remove unnecessary build result example * use a partial for common steps * misc style cleanup
1 parent 60ba7d0 commit 32bb57c

15 files changed

Lines changed: 847 additions & 590 deletions

antora.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ start_page: 'index.adoc'
55

66
nav:
77
- modules/ROOT/nav.adoc
8-
- modules/jms-migration/nav.adoc
9-
- modules/examples/nav.adoc
10-
- modules/reference/nav.adoc
118

129
asciidoc:
1310
attributes:
1411
jms_repo: 'https://github.com/datastax/pulsar-jms/'
12+
pulsar-reg: 'Apache Pulsar(TM)'
13+
pulsar: 'Apache Pulsar'
14+
pulsar-short: 'Pulsar'
15+
product: 'Starlight for JMS'
16+
luna-streaming: 'Luna Streaming'
17+
astra-streaming: 'Astra Streaming'

modules/ROOT/nav.adoc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
* {jms_repo}[Github repo]
2-
* xref:pulsar-jms-faq.adoc[]
1+
.Get started
2+
* {jms_repo}[Github repository]
3+
* xref:jms-migration:pulsar-jms-install.adoc[]
4+
* xref:jms-migration:pulsar-jms-quickstart-sa.adoc[]
5+
* xref:ROOT:pulsar-jms-faq.adoc[]
6+
7+
.Configure
8+
* xref:reference:pulsar-jms-mappings.adoc[]
9+
* xref:examples:pulsar-jms-implementation.adoc[]
10+
* xref:examples:pulsar-jms-batch-ack.adoc[]
11+
* xref:examples:pulsar-jms-server-side-filters.adoc[]
12+
* xref:reference:pulsar-jms-reference.adoc[]

modules/ROOT/pages/index.adoc

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
= About Starlight for JMS
2-
:navtitle: Starlight for JMS
1+
= About {product}
2+
:navtitle: {product}
33

4-
Starlight for JMS is the first highly compliant JMS implementation designed to run on a modern streaming platform. It allows enterprises to take advantage of the scalability and resiliency of a modern streaming platform to run their existing JMS applications. Because Apache Pulsar(TM) is open-source and cloud-native, Starlight for JMS enables enterprises to move their JMS applications to run on-premises and in any cloud environment.
4+
{jms_repo}[{product}] is the first highly compliant JMS implementation designed to run on a modern streaming platform.
5+
It allows enterprises to take advantage of the scalability and resiliency of a modern streaming platform to run their existing JMS applications. Because {pulsar-reg} is open-source and cloud-native, {product} enables enterprises to move their JMS applications to run on-premises and in any cloud environment.
56

67
== Key Features
78

8-
Starlight for JMS key features include:
9+
{product} key features include:
910

1011
* *Blazing fast JMS performance*: Achieve 1 million JMS messages per second with 99 percentile publish to acknowledge latency of less than 10 ms.
1112
* *Drop-in replacement for existing JMS applications*: Supports JMS/Jakarta 2.0 and is backwards compatible with JMS 1.1. 100% pass rate on JMS compliance test for supported features.
12-
* *Horizontally scalable JMS*: Apache Pulsar is a horizontally scaled distributed streaming platform. You can scale up or down without operational hassles. Pulsar separates compute from storage, which means you can scale those dimensions independently, as required. Pulsar supports offloading old data to object storage for practically infinite storage capacity.
13-
* *Reduced total cost of ownership*: Because Apache Pulsar is natively multi-tenant and high performance, you can consolidate JMS applications spread across multiple legacy JMS brokers onto a single Apache Pulsar installation. And since Pulsar is easily horizontally scaled, you don’t need to overprovision.
14-
* *Future proof*: Apache Pulsar can support traditional messaging workloads, but it can also support modern streaming use cases such as log collection, microservices integration, event streaming, event sourcing. New workloads can run alongside Legacy JMS applications.
15-
* *Open source to avoid lock in*: Starlight for JMS and Apache Pulsar are 100% open source. You can run on-premise, in any cloud provider, or in Kubernetes.
16-
* *Adds message replay to JMS*: Apache Pulsar natively supports message retention and replay. This allows applications using Fast JMS for Apache Pulsar to travel back in time and replay previously consumed messages to recover from misconfiguration issues, recover from bugs in application code, and test new applications against real data.
17-
18-
== What's next?
19-
20-
* *xref:jms-migration:pulsar-jms-quickstart-sa.adoc[]*: Create a simple command line Java JMS client that connects to a local Pulsar installation.
21-
* *xref:streaming-learning:use-cases-architectures:starlight/jms/index.adoc[]*: Create a simple command line Java JMS client that connects to an Astra Streaming instance.
22-
* *xref:jms-migration:pulsar-jms-install.adoc[]*: Install Starlight for JMS in your own JMS project.
23-
* *xref:reference:pulsar-jms-mappings.adoc[]*: Understand Pulsar concepts in the context of JMS.
24-
* *xref:examples:pulsar-jms-implementation.adoc[]*: Understand key implementation details for Starlight for JMS.
25-
* *xref:pulsar-jms-faq.adoc[]*: Frequently asked questions about Starlight for JMS.
26-
* *xref:reference:pulsar-jms-reference.adoc[]*: Starlight for JMS configuration reference.
27-
* *{jms_repo}[Starlight for JMS Github repo]*
13+
* *Horizontally scalable JMS*: {pulsar} is a horizontally scaled distributed streaming platform. You can scale up or down without operational hassles. {pulsar-short} separates compute from storage, which means you can scale those dimensions independently, as required. {pulsar-short} supports offloading old data to object storage for practically infinite storage capacity.
14+
* *Reduced total cost of ownership*: Because {pulsar} is natively multi-tenant and high performance, you can consolidate JMS applications spread across multiple legacy JMS brokers onto a single {pulsar} installation. And since {pulsar-short} is easily horizontally scaled, you don't need to overprovision.
15+
* *Future proof*: {pulsar} can support traditional messaging workloads, but it can also support modern streaming use cases such as log collection, microservices integration, event streaming, event sourcing. New workloads can run alongside Legacy JMS applications.
16+
* *Open source to avoid lock in*: {product} and {pulsar} are 100% open source. You can run on-premise, in any cloud provider, or in Kubernetes.
17+
* *Adds message replay to JMS*: {pulsar} natively supports message retention and replay. This allows applications using Fast JMS for {pulsar} to travel back in time and replay previously consumed messages to recover from misconfiguration issues, recover from bugs in application code, and test new applications against real data.
18+
19+
== Get started with {product}
20+
21+
* xref:jms-migration:pulsar-jms-quickstart-sa.adoc[]
22+
* xref:jms-migration:pulsar-jms-install.adoc[]
23+
* xref:ROOT:pulsar-jms-faq.adoc[]
24+
25+
== Learn more about {product}
26+
27+
* xref:reference:pulsar-jms-mappings.adoc[]
28+
* xref:examples:pulsar-jms-implementation.adoc[]
29+
* xref:reference:pulsar-jms-reference.adoc[]

modules/ROOT/pages/pulsar-jms-faq.adoc

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
= Starlight for JMS FAQs
1+
= {product} FAQs
22
:navtitle: FAQs
33

4-
Answers to the (arguably) most common Starlight for JMS questions.
4+
Answers to common {product} questions.
55

6-
== What is the pricing for Starlight for JMS?
6+
== What is the pricing for {product}?
77

8-
Starlight for JMS is open source and is included in https://www.ibm.com/docs/en/supportforpulsar[IBM Elite Support for Apache Pulsar].
8+
{product} is open source and is included in https://www.ibm.com/docs/en/supportforpulsar[IBM Elite Support for {pulsar}].
99

10-
== How is Starlight for JMS licensed?
10+
== How is {product} licensed?
1111

12-
Starlight for JMS is licensed under https://www.apache.org/licenses/LICENSE-2.0.txt[Apache version 2.0].
12+
{product} is licensed under https://www.apache.org/licenses/LICENSE-2.0.txt[Apache version 2.0].
1313

14-
== How can I use Starlight for JMS in a JakartaEE(R) or JavaEE(R) application?
14+
== How can I use {product} in a JakartaEE(R) or JavaEE(R) application?
1515

1616
You can use the `resourceAdapter` {jms_repo}blob/master/resource-adapter[here].
1717

@@ -24,7 +24,7 @@ In the tck-executor module you'll find:
2424
* The Java Code needed to initialize the TCK, `JNDIInitialContextFactory.java`.
2525
* The configuration file for the TCK runner, `ts.jte`.
2626
* A file that contains the excluded tests that cannot pass with this client, `ts.jtx`
27-
* Scripts to run Apache Pulsar 2.7.1, configure the Transaction Coordinator, and prepare for the execution of the TCK.
27+
* Scripts to run {pulsar} 2.7.1, configure the Transaction Coordinator, and prepare for the execution of the TCK.
2828

2929
To build the package, run unit tests, and run the TCK:
3030

@@ -40,7 +40,7 @@ To run only the TCK:
4040
mvn clean install -Prun-tck -am -DskipTests -pl tck-executor
4141
----
4242

43-
IMPORTANT: Globally unique subscription names are not supported so the corresponding tests are skipped.
43+
IMPORTANT: Globally unique subscription names aren't supported so the corresponding tests are skipped.
4444

4545
== Where can I find additional integration examples?
4646

@@ -50,9 +50,9 @@ We've provided the following integration examples:
5050
* {jms_repo}blob/master/examples/payara-micro[Payara Micro(R)]
5151
* {jms_repo}blob/master/resource-adapter-tests[Apache TomEE(R)]
5252

53-
== How can I build Starlight for JMS from source?
53+
== How can I build {product} from source?
5454

55-
If you'd like to fork or contribute to Starlight for JMS:
55+
If you'd like to fork or contribute to {product}:
5656

5757
. Clone the git repo:
5858
+
@@ -72,13 +72,3 @@ mvn clean install
7272

7373
Refer to the https://jakarta.ee/specifications/messaging/2.0/[official JMS documentation] in order to learn about JMS.
7474
This https://javaee.github.io/jms-spec/[website] is useful as well as it contains the former JMS 2.0 specifications before the Jakarta transition.
75-
76-
== What's next?
77-
78-
* *xref:jms-migration:pulsar-jms-quickstart-sa.adoc[]*: Create a simple command line Java JMS client that connects to a local Pulsar installation.
79-
* *xref:streaming-learning:use-cases-architectures:starlight/jms/index.adoc[]*: Create a simple command line Java JMS client that connects to an Astra Streaming instance.
80-
* *xref:jms-migration:pulsar-jms-install.adoc[]*: Install Starlight for JMS in your own JMS project.
81-
* *xref:reference:pulsar-jms-mappings.adoc[]*: Understand Pulsar concepts in the context of JMS.
82-
* *xref:examples:pulsar-jms-implementation.adoc[]*: Understand key implementation details for Starlight for JMS.
83-
* *xref:reference:pulsar-jms-reference.adoc[]*: Starlight for JMS configuration reference.
84-
* *{jms_repo}[Starlight for JMS Github repo]*
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
. Create a new Maven project:
2+
+
3+
[source,bash]
4+
----
5+
mvn archetype:generate \
6+
-DgroupId=org.example \
7+
-DartifactId=StarlightForJMSClient \
8+
-DarchetypeArtifactId=maven-archetype-quickstart \
9+
-DinteractiveMode=false
10+
----
11+
12+
. Change to the new project directory:
13+
+
14+
[source,bash]
15+
----
16+
cd StarlightForJMSClient
17+
----
18+
19+
. Open the project in your IDE, and then add the {product} dependency to the `pom.xml` file.
20+
+
21+
This quickstart uses the `pulsar-jms-all` package, which is a fat JAR file that includes all dependencies.
22+
{company} recommends using the {jms_repo}releases[latest stable release].
23+
+
24+
.pom.xml
25+
[source,xml]
26+
----
27+
<dependencies>
28+
<dependency>
29+
<groupId>com.datastax.oss</groupId>
30+
<artifactId>pulsar-jms-all</artifactId>
31+
<version>3.2.0</version>
32+
</dependency>
33+
</dependencies>
34+
----
35+
36+
. Set the compiler source and target according to your Java version:
37+
+
38+
.pom.xml
39+
[source,xml]
40+
----
41+
<properties>
42+
<maven.compiler.source>11</maven.compiler.source>
43+
<maven.compiler.target>11</maven.compiler.target>
44+
</properties>
45+
----
46+
47+
. For this quickstart, include the following plugin configuration in the `build` section:
48+
+
49+
* **`<artifactId>maven-assembly-plugin</artifactId>`**: The Maven Assembly Plugin that is used to compile a JAR file with all dependencies included.
50+
* **`<descriptorRef>jar-with-dependencies</descriptorRef>`**: An additional descriptor appended to the compiled JAR file name.
51+
* **`<mainClass>org.example.App</mainClass>`**: The default package and class so you can run the compiled JAR file without any additional specifications.
52+
+
53+
.pom.xml
54+
[source,xml]
55+
----
56+
<build>
57+
<plugins>
58+
<plugin>
59+
<artifactId>maven-assembly-plugin</artifactId>
60+
<configuration>
61+
<descriptorRefs>
62+
<descriptorRef>jar-with-dependencies</descriptorRef>
63+
</descriptorRefs>
64+
<archive>
65+
<manifest>
66+
<mainClass>org.example.App</mainClass>
67+
</manifest>
68+
</archive>
69+
</configuration>
70+
</plugin>
71+
</plugins>
72+
</build>
73+
----
74+
75+
. In your Maven project, create an `example` subdirectory at `/src/main/java/org`:
76+
+
77+
[source,bash]
78+
----
79+
mkdir -p /src/main/java/org/example
80+
----

modules/examples/nav.adoc

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1-
= Batch index acknowledgement
1+
= Use batch index acknowledgement with {product}
2+
:navtitle: Use batch index acknowledgement
23

3-
Starlight for JMS improves acknowledgement of batched messages by supporting the tracking of 'ack' status by *batch index*. +
4+
{product} improves acknowledgement of batched messages by supporting the tracking of 'ack' status by batch index.
45

5-
By default, filtering works on the *entry* level in Pulsar. An *entry* is a *single message* or a *single batch of messages*. The client will not filter out a few messages in a batch; it either passes completely or fails completely. +
6+
By default, filtering works on the entry level in {pulsar-short}.
7+
An _entry_ is a single message, or a single batch of messages.
8+
The client cannot selectively filter messages in a batch; it either passes completely or fails completely.
69

7-
With *batch index acknowledgement*, when the broker dispatches messages, it will carry the batch index that has been acknowledged. The client will filter out batch indexes that have been acked. +
10+
With batch index acknowledgement, when the broker dispatches messages, it carries the batch index that has been acknowledged.
11+
Then, the client filters out batch indexes that have been acknowledged.
12+
Finally, the client sends the batch index acknowledgement information to the broker so the broker can maintain the batch index acknowledgement status.
813

9-
The client sends the batch index ack information to the broker, so the broker can maintain the batch index ack status. +
10-
11-
This approach requires cooperation between the client and broker, so we must modify both `broker.conf` and the `consumerConfig` JMS client property to enable batch acknowledgement. +
12-
13-
DataStax *strongly recommends* these configurations for increased efficiency, whether using *broker-side* or *client-side* selectors.
14+
[TIP]
15+
====
16+
{company} strongly recommends using batch index acknowledgement for increased efficiency, whether using broker-side or client-side selectors.
17+
====
1418

1519
== Enable batch index acknowledgement
1620

17-
. Add the configuration property `acknowledgmentAtBatchIndexLevelEnabled=true` to `broker.conf`:
21+
Batch index acknowledgement requires cooperation between the client and broker.
22+
You must modify both `broker.conf` and the `consumerConfig` JMS client property to enable batch acknowledgement:
23+
24+
. In your `broker.conf` file, add the configuration property `acknowledgmentAtBatchIndexLevelEnabled` and set it to `true`:
1825
+
19-
[source,java]
26+
[source,conf]
2027
----
2128
acknowledgmentAtBatchIndexLevelEnabled=true
2229
----
2330

24-
. Set the `consumerConfig` property on the JMS client by adding `consumerConfig.put("batchIndexAckEnabled", true);` to `consumerConfig` in the ConnectionFactory configuration:
31+
. In your Java project, set the `consumerConfig` property on the JMS client by adding `consumerConfig.put("batchIndexAckEnabled", true);` to `consumerConfig` in the `ConnectionFactory` configuration:
2532
+
2633
[source,java]
2734
----
@@ -33,10 +40,7 @@ acknowledgmentAtBatchIndexLevelEnabled=true
3340
try (PulsarConnectionFactory factory = new PulsarConnectionFactory(properties));
3441
----
3542

36-
== What's next?
37-
38-
For more on *server-side filtering*, see xref:pulsar-jms-server-side-filters.adoc[Server side filters]. +
39-
For more on acknowledgements in Starlight for JMS, see xref:reference:pulsar-jms-mappings.adoc#consumer-mappings[Consumer Mappings].
40-
41-
43+
== See also
4244

45+
* xref:pulsar-jms-server-side-filters.adoc[]
46+
* xref:reference:pulsar-jms-mappings.adoc#consumer-mappings[Consumer mappings]

0 commit comments

Comments
 (0)