Skip navigation links

Package com.adaptris.jmx.remote.provider.solace

JMX Remote provider for Solace.

See: Description

Package com.adaptris.jmx.remote.provider.solace Description

JMX Remote provider for Solace.

Various URL query parameters control the behaviour of the the JMS Connection; which are described in the table below. Each of these properties can also be provided in the initial set of attributes that is passed in JMXConnectorServerFactory#newJMXConnectorServer or JMXConnectorFactory#newJMXConnector(). All keys are case sensitive and if specified on the URL, will be stripped before being passed to com.solacesystems.jms.SolConnectionFactory

Attribute/Parameter Description
jmx.type The destination type (i.e. Topic or Queue; case-sensitive); defaults to Topic.
jmx.destination The name of a Topic or Queue; if not assigned, then a unique one will be created to avoid exceptions; this is, though, pointless from a usability perspective
jmx.brokerUser The username to connect to the broker (if required); defaults to 'default'.
jmx.brokerPassword The password to connect to the broker (if required); defaults to ''.
jmx.timeout The timeout in milliseconds for a client to wait for a reply after sending a request; defaults to 60000.
jmx.clientid The client ID to be associated with the underlying com.solacesystems.jms.SolConnectionFactory if desired; defaults to null.
jmx.messageVPN The message VPN to use when connecting to router; defaults to default.
jmx.backupBrokers A comma separated list of additional brokers that should serve as a list of backup brokers. Note that doing this as part of the URL will make it hard to read, so that should be discouraged from maintainability point of view, it will be best to add the backup brokers as part of the initial environment

You can mix and match the environment with the URL, the URL will take precedence, apart from in the case where JMXConnector.CREDENTIALS exists in the initial set of attributes, that will always replace the brokerUser and brokerPassword.

Or if you want to have things in the initial environment, then you could have something like

  JMXServiceURL url = new JMXServiceURL("service:jmx:solace://tcp://localhost:55555?jmx.destination=SampleQ1");
  Map env = new HashMap();
  env.put(JmsJmxConnectionFactory.ATTR_DESTINATION_TYPE, "Queue");
  env.put(JmsJmxConnectionFactory.ATTR_BROKER_USERNAME, "MyUserName");
  env.put(JmsJmxConnectionFactory.ATTR_BROKER_PASSWORD, "MyPassword");
  env.put(ProviderAttributes.ATTR_MESSAGE_VPN, "default");
  env.put(ProviderAttributes.ATTR_BACKUP_BROKER_URLS, "smf://backupBroker1:55555,smf://backupBroker2:55555");
  JMXConnector jmxClient = JMXConnectorFactory.newJMXConnector(url, env);
  jmxClient.connect();  
  
Skip navigation links