JMS Channels

Contents

Placement in NetarchiveSuite software

Every channel is named after the set of applications instances that are expected to receive messages sent to it. All channel names are constructed privately in the dk.netarkivet.distribute.ChannelID class. To get a channel, you must use one of the public methods in dk.netarkivet.distribute.Channels.

Channel Behavior

There are used to types of channels:

  • Queue where only one listener takes a message from the queue. For example a queue where a request for doing a harvest is only received by one harvester.
  • Topic where all listeners takes a copy of the message. For example a batch job which has to be executed by all bitarchive applications.
    The type of channel is not affecting the channel name directly. It is indicated by the Channel Prefix, since only channel names starting with ALL are topics, while the rest are queues.

The channel type for different queues is given in a table in the next section.

Naming Conventions

The structure of channel names are as follows:

<Environment Name>_<Channel Prefix>_<Replica Annotation>[_<Machine>][_<Application Instance>]
  • Environment Name value must be the same for all channels on all JVMs belonging to a single NetarchiveSuite installation. It identifies the environment for the queue, e.g.: "DEV", "TEST", "RELEASETEST", "CLOVER", "PROD" or initials of developer running personal environment for e.g. sanity tests. It is read from the setting settings.common.environmentName of the NetarchiveSuite installation.
  • Channel Prefix  is constructed by a convention for channel behavior together with denotation of the concerned application(s). For example THE_SCHED uses the convention THE for SCHED denoting the scheduler of the harvesting system. The scheduler is now embedded in the HarvestJobManager.

The conventions for channel behavior are:

  • THE - communicate with singleton in the system.
  • THIS - communicate with one uniquely identified instance of a number of distributed listeners.
  • ANY - has all instances listening to the same queue.
  • ALL - is used for topics only, i.e. topics are sent to all listeners on the channel.
  • Use Replica Id will result in a channel name with the replica identifier in question (which must match possible replicas in settings). In case of no use of replica id the COMMON will be used.
  • Use IP Node will result in a channel name with the IP address of the machine whether the application in question is placed. It is read directly from the running system.
    . In case of no use of IP Node, nothing will be written.
  • Use Application Instance Id is used, if only one process is expected to listen to the queue. It will result in a channel name with an identification of the individual application instance. It consists of the application abbreviation (uppercase letters of application name) and the application instance identifier from the settings. It is read from the common settings: settings.common.applicationName and settings.common.applicationInstanceId.
    . In case of no use of Application Instance Id, nothing will be written.
  • Channel Type is only here to complete the picture. Please refer to the section on channel behavior.
    Channel names are constructed as described in the below table (columns described after the table).

    Channel Prefix

    Use Replica Id
    (for Replica Annotation)

    Use IP Node
    (for Machine)

    Use Application Instance Identification

    Channel Type

    Example

    THE_SCHED

    No

    No

    No

    Queue

    PROD_THE_SCHED_COMMON

    ANY_HIGHPRIORITY_HACO

    No

    No

    No

    Queue

    PROD_ANY_HIGHPRIORITY_HACO_COMMON

    ANY_LOWPRIORITY_HACO

    No

    No

    No

    Queue

    PROD_ANY_LOWPRIORITY_HACO_COMMON

    THIS_REPOS_CLIENT

    No

    Yes

    Yes

    Queue

    PROD_THIS_REPOS_CLIENT_COMMON_130_226_258_7_HCA_HIGH

    THE_REPOS

    No

    No

    No

    Queue

    PROD_THE_REPOS_COMMON

    THE_BAMON

    Yes

    No

    No

    Queue

    PROD_THE_BAMON_TWO

    ALL_BA

    Yes

    No

    No

    Topic

    PROD_ALL_BA_TWO

    ANY_BA

    Yes

    No

    No

    Queue

    PROD_ANY_BA_TWO

    THIS_INDEX_CLIENT

    No

    Yes

    Yes

    Queue

    PROD_THIS_INDEX_CLIENT_COMMON_130_226_258_7_ISA

    INDEX_SERVER

    No

    No

    No

    Queue

    PROD_INDEX_SERVER_COMMON

    MONITOR

    No

    No

    No

    Queue

    PROD_MONITOR_COMMON

    ERROR

    No

    No

    No

    Queue

    PROD_ERROR_COMMON

    THE_CR

    Yes

    No

    No

    Queue

    PROD_THE_CR_THREE

The examples are using values

  • Environment name PROD
  • Possible replica identifiers ONE or TWO
  • IP on machine 130.226.258.7
  • Application instances
  • HCA_HIGH (for HarvestControllerApplication with instance id HIGH )
  • ISA (for IndexServerApplication with instance id "" )

Design Notes

Note that creation of channel names for the ANY xxx_HACO-queues are designed in a way so extension to more priorities is easy.