Starlight for JMS configuration reference
A complete configuration reference for Starlight for JMS.
Set configuration options
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 is 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
The |
|
no |
Map<String,Object> |
Empty Map |
Additional configuration for each Pulsar Consumer. For all valid consumer objects, see the Apache Pulsar documentation. |
|
no |
boolean |
false |
Enable transactions
|
|
no |
boolean |
false |
Force acknowledgment of filtered messages on shared subscriptions
By default, filtered messages are negatively acknowledged on shared subscriptions. If this flag is |
|
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. Enable features that aren’t supported directly by the Pulsar Broker but are emulated on the client side. |
|
no |
boolean |
false |
Force the deletion of temporary destinations. Use the Pulsar API to force the deletion even if the temporary destination has active subscriptions. |
|
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: |
|
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.
Set this to |
|
no |
boolean |
true |
Allow the client to use the Pulsar Admin API.
Set this to |
|
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. Used to wait for Queue subscriptions to be ready. |
|
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. Must be customized as required for Pulsar standalone instances that aren’t running on localhost. |
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. |