Just a second...

Configuring the JMS adapter

Use the JMSAdapter.xml configuration file to configure the JMS adapter to send and receive messages with destinations on a JMS server.

The format of the JMSAdapter.xml configuration file is the same whether you run it within the Diffusion™ server or as a standalone client. However, the server-connection element and child elements are only used when the JMS adapter is run as a standalone client. If the server-connection element is included in a JMSAdapter.xml configuration file used when the JMS adapter runs within the Diffusion server, the JMS adapter ignores the element.

The JMSAdapter.xml and the JMSAdapter.xsd schema file that describes its format are available in the adapters/jms directory of the Diffusion installation. For more information, see .

In the JMSAdapter.xml file, you can configure the following aspects of the JMS adapter behavior:

Configuring the JMS adapter to run within the Diffusion server

The JMS adapter running inside the Diffusion server uses the JMSAdapter.xml configuration file that is located in the adapters directory of the Diffusion installation.

When running inside the Diffusion server, the JMS adapter polls the JMSAdapter.xml file at five second intervals. If the timestamp changes in that interval, the JMS adapter reloads the configuration file.

When the JMS adapter reloads the configuration file, changes to the configuration are reflected in the set of Diffusion topics created and used by the JMS adapter:
  • If the topic configuration is not changed, the topic is not changed on the Diffusion server.
  • If a topic configuration is added, that topic is added on the Diffusion server.
  • If a topic configuration is removed, that topic is deleted from the Diffusion server.
  • If a topic configuration is changed – for example, if its definition is changed from stateful to stateless – that topic is deleted from the Diffusion server and a new topic is created at the same path.
Any removal of topics as part of a configuration update causes clients to become unsubscribed from the deleted topic.

When updating the JMSAdapter.xml configuration file on your running Diffusion server, consider using the following practices:
  • Back up your original configuration file. For example, by moving it to JMSAdapter.xml.bak.

    If a configuration file is not present, the JMS adapter continues to use its current configuration.

  • Do not copy the new configuration file into place. Use a move operation instead. Move operations are atomic and remove the risk of the JMS adapter reading an incomplete file.
  • In a production environment, rigorously test any new configuration file before deploying on a production server.

If the new configuration file contains an error, the configuration changes it contains are not applied. Instead the configuration rolls back to the original version and an error is logged.

Configuring the JMS adapter to run as a standalone client

When running as a standalone client, the JMS adapter uses the JMSAdapter.xml configuration file that is passed to the jms_adapter.sh or jms_adapter.bat file used to start the JMS adapter.

The JMS adapter standalone client loads the JMSAdapter.xml file only once, when the JMS adapter is started. To update the configuration used by the JMS adapter, edit the JMSAdapter.xml file and restart the JMS adapter.

Topics created by the JMS adapter when it runs as a standalone client remain on the Diffusion server after the JMS adapter session closes.

The server-connection element of the JMSAdapter.xml configuration file is used by the standalone client version of JMS adapter to define the connection that the JMS adapter makes to the Diffusion server. For more information, see Example: Configuring the Diffusion connection for the JMS adapter running as a standalone client.