Skip to content

JMS Bridge Configuration

All configuration for the JMS Bridge is provided via a jms-bridge.conf file that is passed to the jms-bridge-server-start script.

The configuration is written using Lightbend’s config library and the HOCON format.
🔗 Learn more about HOCON


The following is a simple configuration for the JMS Bridge, which connects to a Kafka cluster and uses default settings for message types and topics.

jms-bridge.conf
bridge {
id = quick-start-basic
kafka {
bootstrap.servers = "<kafka-host>:<kafka-port>"
}
journals {
topic {
replication = 1
}
}
}

  • bridge: Root configuration block for the JMS Bridge service.
    • id: Unique identifier for the bridge instance. Used in topic naming.
  • kafka:
    • bootstrap.servers: Address of the Kafka broker(s) to connect to. (e.g., localhost:9092 or your-kafka-host:9092)
  • journals:
    • topic.replication: Replication factor for journal topics.

Kafka Deployment Notes:

  • Local or VM Kafka: Replace <kafka-host>:<kafka-port> with your local/VM Kafka broker address.

  • Confluent Cloud: If using Confluent Cloud, you need to provide additional security parameters in the configuration file.

    • Replace <kafka-host>:<kafka-port> with your Confluent Cloud Kafka cluster address.

    • Add the following security parameters to the kafka block:

      kafka {
      bootstrap.servers = "<kafka-host>:<kafka-port>"
      security.protocol = SASL_SSL
      sasl.jaas.config = org.apache.kafka.common.security.plain.PlainLoginModule required
      username="<your_username>"
      password="<your_password>";
      sasl.mechanism = PLAIN
      }

The following configuration includes advanced settings such as routing, security, and Kafka Streams state directory.

jms-bridge.conf
bridge {
id = quick-start-kafka-integration
kafka {
bootstrap.servers = "<kafka-host>:<kafka-port>"
}
streams {
state.dir = "/<path-to>/kafka-streams"
}
journals {
topic {
replication = 1
}
}
security {
domain = "MyDomain"
}
routing = {
metadata.refresh.ms=60000
topics = [
{
match = ".*invoice.*"
message.type = "TEXT"
},
{
match = ".*payment.*"
message.type = "TEXT"
}
]
}
}

  • bridge: Root configuration block for the JMS Bridge service.
    • id: Unique identifier for the bridge instance. Used in topic naming.
  • kafka:
    • bootstrap.servers: Address of the Kafka broker(s) to connect to.
  • streams:
    • state.dir: Local directory where Kafka Streams stores its internal state. Defaults to /tmp/kafka-streams.
  • journals:
    • topic.replication: Replication factor for journal topics.
  • security:
    • domain: JAAS login context name defined in your login.config.
  • routing: Defines how JMS addresses are mapped to Kafka topics.
    • metadata.refresh.ms: Time interval to synchronize topic mappings. Default is 50000 ms.
    • topics:
      • match: Regex to match JMS addresses (e.g., .*invoice.*).
      • message.type: Message format (TEXT or BYTES).