Package com.adaptris.jmx.remote.provider.sonicmq
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
progress.message.jclient.ConnectionFactory
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 'Administrator'. |
jmx.brokerPassword |
The password to connect to the broker (if required); defaults to 'Administrator'. |
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
progress.message.jclient.ConnectionFactory if desired; defaults
to null. |
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:sonicmq:///tcp://localhost:2506?jmx.type=Topic&jmx.destination=jmxTopic
- service:jmx:sonicmq:///tcp://localhost:2506?jmx.type=Queue&jmx.destination=SampleQ1
- service:jmx:sonicmq:///tcp://localhost:2506?jmx.type=Topic&jmx.destination=jmxTopic&jmx.brokerUser=Administrator&jmx.brokerPassword=Administrator
- service:jmx:sonicmq:///tcp://localhost:2506?jmx.type=Topic&jmx.destination=jmxTopic&jmx.backupBrokers=tcp%3a%2f%2flocalhost%3a2507%2Ctcp%3a%2f%2flocalhost%3a2508
Or if you want to have things in the initial environment, then you could have something like
JMXServiceURL url = new JMXServiceURL("service:jmx:sonicmq://tcp://localhost:2506?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_BACKUP_BROKER_URLS, "tcp://backupBroker1:2506,tcp://backupBroker2:2506"); JMXConnector jmxClient = JMXConnectorFactory.newJMXConnector(url, env); jmxClient.connect();
-
Interface Summary Interface Description ProviderAttributes Additional attributes that are supported by the SonicMQ Provider. -
Class Summary Class Description ClientProvider ServerProvider