Sun Java System Messaging Server 6.3 Administration Guide

ProcedureTo Configure a JMQ Notification Plug-in

In this procedure, you first configure the message events that will produce notifications. Next, you specify the information needed by Message Queue. Finally (in step 9), you configure the plug-in name by specifying a parameter after the name of the plug-in library:


'/opt/SUNWmsgsr/lib/libjmqnotify$plug-in_name'

If you do not specify a plug-in name, jmqnotify is used by default.

Before You Begin

You should install, configure, and deploy the following products:


Note –

Most of the configutil parameters you will configure in the following steps are optional. For a list of their default values, see Table 22–2.


  1. Configure the notification message parameters.

    For each kind of notification message you want to include in the plug-in, use the local.store.notifyplugin command with the configutil utility.

    For example, to enable notifications for new messages, enter:


    configutil -o local.store.notifyplugin.jmqnotify.NewMsg.enable -v 1

    where jmqnotify is the name of the plug-in

    and -v 1 enables notifications for this message. A value of 0 disables notifications for this message.

    For a list of all the JMQ notification messages, see 22.3.1 Notification Messages.

    For definitions of the configutil parameters that enable the JMQ notification messages, see “Chapter 3: Messaging Server Configuration,” in the Sun Java System Messaging Server Administration Reference.

    A few notification messages use more than one configutil parameter to enable the message with additional features. For example, some messages can carry message headers in the notification text. For instructions on how to configure these messages, see Syntax for newflags and oldflags Properties.


    Note –

    You must configure parameters separately for each plug-in you configure.

    Thus, if you configure two plug-ins, named jmq1 and jmq2, and you want to enable new-message notifications for both plug-ins, you must run the local.store.notifyplugin command twice:


    configutil -o local.store.notifyplugin.jmq1.NewMsg.enable -v 1

    configutil -o local.store.notifyplugin.jmq2.NewMsg.enable -v 1

  2. Specify the host where the Message Queue destination (broker) is running.

    For example, enter the following command:


    configutil -o local.store.notifyplugin.jmqnotify.jmqHost -v "127.0.0.1"

    where jmqnotify is the name of the plug-in

    and "127.0.0.1" is the IP address of the host machine for the Message Queue broker.

  3. Specify the port for the Message Queue broker.

    For example, enter the following command:


    configutil -o local.store.notifyplugin.jmqnotify.jmqPort -v "7676"

    where jmqnotify is the name of the plug-in

    and "7676" is the port for the Message Queue broker.

  4. Specify the user ID and password of the Message Queue user authorized to produce messages to the service.

    For example, enter the following commands:


    configutil -o local.store.notifyplugin.jmqnotify.jmqUser -v "guest"

    configutil -o local.store.notifyplugin.jmqnotify.jmqPwd -v "%$#a62t&"

    where jmqnotify is the name of the plug-in

    and "guest" and "%$#a62t&" are the user ID and password, respectively, for the Message Queue user.

  5. Configure the type of destination (topic or queue) and the name of the destination to which messages will be sent.

    Follow these steps:

    1. Specify whether the destination is a topic or queue.

      For example, enter the following command:


      configutil -o local.store.notifyplugin.jmqnotify.DestinationType -v "queue"

      where jmqnotify is the name of the plug-in

      and "queue" specifies that the destination is a queue. The allowed values for this parameter are "queue" and "topic".

    2. Specify the destination name.

      For example, enter one of the following commands:


      configutil -o local.store.notifyplugin.jmqnotify.jmqQueue -v "JES-MS"

      or


      configutil -o local.store.notifyplugin.jmqnotify.jmqTopic -v "JES-MS"

      where jmqnotify is the name of the plug-in

      jmqQueue or jmqTopic identifies the destination type. The jmqQueue and jmqTopic parameters are synonymous and mutually exclusive; you can only use one of these parameters in one plug-in.

      "JES-MS" is an example name of the queue or topic to which messages will be sent.

  6. Specify the message priority.

    For example, enter the following command:


    configutil -o local.store.notifyplugin.jmqnotify.Priority -v 3

    where jmqnotify is the name of the plug-in

    and -v 3 is the Message Queue priority assigned to messages produced by this plug-in.

    The default value of the Priority is 4.

  7. Specify the length of time (in milliseconds) that messages are retained by the Message Queue broker.

    For example, enter the following command:


    configutil -o local.store.notifyplugin.jmqnotify.ttl -v 100

    where jmqnotify is the name of the plug-in

    and -v 100 specifies that a message is retained by the Message Queue service for 100 milliseconds before being either delivered or discarded. A value of 0 means that a message is retained permanently; it does not time out.

  8. Specify the message persistence.

    For example, enter the following command:


    configutil -o local.store.notifyplugin.jmqnotify.Persistent -v 1

    where jmqnotify is the name of the plug-in

    and -v 1 specifies that persistent messages are used in the Message Queue service. Allowed values are 1 (persistent) and 0 (non-persistent).

  9. Configure the plug-in name.

    To configure a single plug-in with the default name, you can enter either the fully qualified name of the plug-in library or the name of the library and its plug-in parameter:


    configutil -o local.store.notifyplugin -v /opt/SUNWmsgsr/lib/libjmqnotify

    or


    configutil -o local.store.notifyplugin -v '/opt/SUNWmsgsr/lib/libjmqnotify$jmqnotify'

    where libjmqnotify is the library name

    and jmqnotify is the default name of the plug-in parameter.

    Use the dollar sign ($) to separate the library name from the parameter.

    Enclose the entire value in single quotes ('value'); if you do not, the shell will interpret the dollar sign.

    The configutil parameters read by the default plug-in have the following names:


    local.store.notifyplugin.jmqnotify.*

    To configure a different plug-in name such as jmq42, you would enter the following command:


    configutil -o local.store.notifyplugin -v '/opt/SUNWmsgsr/lib/libjmqnotify$jmq42'

    The configutil parameters read by the jmq42 plug-in have the following names:


    local.store.notifyplugin.jmq42.*