Package com.adaptris.jmx.remote.provider.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.
- service:jmx:solace:///smf://localhost:55555?jmx.type=Topic&jmx.destination=jmxTopic
- service:jmx:solace:///smf://localhost:55555?jmx.type=Queue&jmx.destination=SampleQ1
- service:jmx:solace:///smf://localhost:55555?jmx.type=Topic&jmx.destination=jmxTopic&jmx.brokerUser=Administrator&jmx.brokerPassword=Administrator
- service:jmx:solace:///smf://localhost:55555?jmx.type=Topic&jmx.destination=jmxTopic&jmx.messageVPN=vpn1
- service:jmx:solace:///smf://localhost:55555?jmx.type=Topic&jmx.destination=jmxTopic&jmx.backupBrokers=smf%3a%2f%2flocalhost%3a55556%2Csmf%3a%2f%2flocalhost%3a55557
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();
-
Interface Summary Interface Description ProviderAttributes -
Class Summary Class Description ClientProvider ServerProvider