org.apache.activemq.artemis.api.jms

## Class ActiveMQJMSClient

- java.lang.Object
- - org.apache.activemq.artemis.api.jms.ActiveMQJMSClient

-     public class ActiveMQJMSClient
      extends Object

  A utility class for creating ActiveMQ Artemis client-side JMS managed resources.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ActiveMQConnectionFactory` | `createConnectionFactory(String url, String name)` Creates an ActiveMQConnectionFactory;
    `static ActiveMQConnectionFactory` | `createConnectionFactoryWithHA(DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType)` Creates an ActiveMQConnectionFactory that receives cluster topology updates from the cluster as servers leave or join and new backups are appointed or removed.
    `static ActiveMQConnectionFactory` | `createConnectionFactoryWithHA(JMSFactoryType jmsFactoryType, TransportConfiguration... initialServers)` Create an ActiveMQConnectionFactory which will receive cluster topology updates from the cluster as servers leave or join and new backups are appointed or removed.
    `static ActiveMQConnectionFactory` | `createConnectionFactoryWithoutHA(DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType)` Create an ActiveMQConnectionFactory which creates session factories from a set of live servers, no HA backup information is propagated to the client The UDP address and port are used to listen for live servers in the cluster
    `static ActiveMQConnectionFactory` | `createConnectionFactoryWithoutHA(JMSFactoryType jmsFactoryType, TransportConfiguration... transportConfigurations)` Create an ActiveMQConnectionFactory which creates session factories using a static list of transportConfigurations.
    `static javax.jms.Queue` | `createQueue(String name)` Creates a client-side representation of a JMS Queue.
    `static javax.jms.Topic` | `createTopic(String name)` Creates a client-side representation of a JMS Topic.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createConnectionFactory

          public static ActiveMQConnectionFactory createConnectionFactory(String url,
                                                                          String name)
                                                                   throws Exception

      Creates an ActiveMQConnectionFactory;
      Returns:
        the ActiveMQConnectionFactory
      Throws:
        `Exception`

    - #### createConnectionFactoryWithHA

          public static ActiveMQConnectionFactory createConnectionFactoryWithHA(DiscoveryGroupConfiguration groupConfiguration,
                                                                                JMSFactoryType jmsFactoryType)

      Creates an ActiveMQConnectionFactory that receives cluster topology updates from the cluster as servers leave or join and new backups are appointed or removed.

      The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP broadcasts which contain connection information for members of the cluster. The broadcasted connection information is simply used to make an initial connection to the cluster, once that connection is made, up to date cluster topology information is downloaded and automatically updated whenever the cluster topology changes. If the topology includes backup servers that information is also propagated to the client so that it can know which server to failover onto in case of live server failure.

      Parameters:
        `groupConfiguration` -
        `jmsFactoryType` -
      Returns:
        the ActiveMQConnectionFactory

    - #### createConnectionFactoryWithoutHA

          public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(DiscoveryGroupConfiguration groupConfiguration,
                                                                                   JMSFactoryType jmsFactoryType)

      Create an ActiveMQConnectionFactory which creates session factories from a set of live servers, no HA backup information is propagated to the client The UDP address and port are used to listen for live servers in the cluster
      Parameters:
        `groupConfiguration` -
        `jmsFactoryType` -
      Returns:
        the ActiveMQConnectionFactory

    - #### createConnectionFactoryWithHA

          public static ActiveMQConnectionFactory createConnectionFactoryWithHA(JMSFactoryType jmsFactoryType,
                                                                                TransportConfiguration... initialServers)

      Create an ActiveMQConnectionFactory which will receive cluster topology updates from the cluster as servers leave or join and new backups are appointed or removed.

      The initial list of servers supplied in this method is simply to make an initial connection to the cluster, once that connection is made, up to date cluster topology information is downloaded and automatically updated whenever the cluster topology changes. If the topology includes backup servers that information is also propagated to the client so that it can know which server to failover onto in case of live server failure.

      Parameters:
        `jmsFactoryType` -
        `initialServers` - The initial set of servers used to make a connection to the cluster. Each one is tried in turn until a successful connection is made. Once a connection is made, the cluster topology is downloaded and the rest of the list is ignored.
      Returns:
        the ActiveMQConnectionFactory

    - #### createConnectionFactoryWithoutHA

          public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(JMSFactoryType jmsFactoryType,
                                                                                   TransportConfiguration... transportConfigurations)

      Create an ActiveMQConnectionFactory which creates session factories using a static list of transportConfigurations.

      The ActiveMQConnectionFactory is not updated automatically as the cluster topology changes, and no HA backup information is propagated to the client

      Parameters:
        `jmsFactoryType` -
        `transportConfigurations` -
      Returns:
        the ActiveMQConnectionFactory

    - #### createTopic

          public static javax.jms.Topic createTopic(String name)

      Creates a client-side representation of a JMS Topic.
      Parameters:
        `name` - the name of the topic
      Returns:
        The Topic

    - #### createQueue

          public static javax.jms.Queue createQueue(String name)

      Creates a client-side representation of a JMS Queue.
      Parameters:
        `name` - the name of the queue
      Returns:
        The Queue

Copyright © 2017. All rights reserved.