Starlight for JMS configuration reference
A complete configuration reference for Starlight for JMS.
Configuration information is passed to the PulsarConnectionFactory constructor:
Map<String, Object> configuration = new HashMap<>();
configuration.put("...","...");
ConnectionFactory factory = new PulsarConnectionFactory(configuration);
...
factory.close();
Configuration information can also be passed as a JSON encoded string:
String configuration = "{.....}";
ConnectionFactory factory = new PulsarConnectionFactory();
factory.setJsonConfiguration(configuration);
...
factory.close();
Configuration information can be passed when a JMSContext or Session is created with JMSContext.createContext or Session.createSession.
Create a PulsarConnectionFactory with initialContext for configuration.
Map<String, Object> configuration = new HashMap<>();
Map<String, Object> consumerConfig = new HashMap<>();
configuration.put("consumerConfig", consumerConfig);
PulsarConnectionFactory factory = new PulsarConnectionFactory(configuration);
PulsarJMSContext initialContext = (PulsarJMSContext) factory.createContext();
The initial configuration in initialContext will be overridden by the subsequent JMSContext configuration withCustomConfiguration.
Map<String, Object> perContextConfiguration new HashMap<>();
Map<String, Object> perContextConsumerConfig = new HashMap<>();
perContextConsumerConfig.put("consumerConfig", perContextConsumerConfig);
JMSContext withCustomConfiguration = initialContext.createContext(mode, perContextConfiguration);
Or override the initial configuration in initialContext with the JMSContext configuration withCustomConfiguration in a Session object.
Session.createSession(int mode, Map<String, Object> withCustomConfiguration)
|
The configuration related to |
Configuration options
| Configuration Entry | Required | Type | Default value | Notes |
|---|---|---|---|---|
|
no |
long |
Disabled |
Set timeout for unacked messages. Must be >1 second. |
|
no |
long |
Same as |
|
|
no |
String |
If not specified, for Pulsar standalone instances running on localhost, defaults to the same value as |
The URL to connect to the Pulsar broker or proxy |
|
no |
Map<String,Object> |
Empty Map |
Additional configuration for each Pulsar Consumer. |
|
no |
boolean |
false |
Enable transactions |
|
no |
boolean |
false |
Force acknowledgment of filtered messages on shared subscriptions |
|
no |
boolean |
false |
Allows temporary topic/queue creation and deletion to pass without errors when |
|
no |
String |
empty string |
Administratively assigned |
|
no |
boolean |
false |
When a |
|
no |
boolean |
false |
Enable emulated features |
|
no |
boolean |
false |
Force the deletion of temporary destinations |
|
no |
boolean |
true |
When set to |
|
no |
String |
jms-queue |
Name of the system subscription used to emulate JMS Queues |
|
no |
String |
public/default |
Default Pulsar namespace in which temporary destinations and destinations without an explicit namespace are created |
|
no |
String |
Shared |
Type of subscription for Shared consumers - Shared|Key_shared|Failover |
|
no |
boolean |
false |
Force all messages sent in scope of a transaction to go to the same partition. |
|
no |
boolean |
false |
Makes |
|
no |
boolean |
true |
Use an Exclusive subscription for Topic consumers |
|
no |
boolean |
true |
Allow the client to use the Pulsar Admin API |
|
no |
boolean |
false |
Offloads message filtering to the Broker nodes. See Server Side Filters. |
|
no |
number |
60000 |
Grace period in ms to wait for the Pulsar broker to be available |
|
no |
|
MultiplierRedeliveryBackoff |
Interface for custom message is |
|
no |
Map<String,Object> |
Empty Map |
Additional configuration for each Pulsar Producer |
|
yes |
String |
`http://localhost:8080` (default) |
Main Pulsar HTTP endpoint |
All other options are passed as configurations to the Pulsar Client and the Pulsar Admin client, allowing you to configure additional Pulsar features, including security.
| Please check Apache Pulsar documentation for a complete list of configuration options. |
Implementation details
Please refer to Implementation details in order to read about how Starlight for JMS emulates some features that are not directly supported by Pulsar.
Next
-
Starlight for JMS standalone quickstart: Create a simple command line Java JMS client that connects to a local Pulsar installation.
-
Getting started with Starlight for JMS: Create a simple command line Java JMS client that connects to an Astra Streaming instance.
-
Installing Starlight for JMS: Install Starlight for JMS in your own JMS project.
-
Mapping Pulsar concepts to JMS specifications: Understand Pulsar concepts in the context of JMS.
-
Starlight for JMS implementation details: Understand key implementation details for Starlight for JMS.
-
Starlight for JMS FAQs: Frequently asked questions about Starlight for JMS.