View Source

h1. JMQ Notification Overview

This page contains the following topics:
{toc:minLevel=2|maxLevel=2}

For related topics on JMQ notification, see the following pages:
* [Enabling JMQ Notification (Example)]
* [Configuring a JMQ Notification Service (Tasks and Examples)|Configuring a JMQ Notification Service (Task)]
* [JMQ Notification Messages and Properties (Reference)|JMQ Notification Messages and Properties]

The Messaging Server notification plug-in allows you to deliver notification messages to a messaging service or event service. The messaging service sends the notifications to consumers (client interfaces), which filter and deliver the messages to specified users.

For example, when new email arrives in a user's mailbox, the notification plug-in delivers a notification message to the messaging service. The message consumer, a component of the messaging service, receives the notification and sends it to the user's email client (such as Convergence or Mozilla Thunderbird). The email client can then display a pop-up on the user's computer screen: “You have received a new message.”

Another example: if a user's mailbox exceeds its quota, the notification plug-in produces an over-quota notification message. The message consumer sends a warning to the user and to an administrator who needs to be informed of the event.{anchor:gcsid}

h2. Two Notification Messaging Services{anchor:indexterm-2178} {anchor:indexterm-2179}

You can configure Messaging Server to deliver notifications to two different messaging services:
* Sun Java System Message Queue 3.6 2005Q4
* Event Notification Service

The Message Queue service implements the Java Messaging Service (JMS) specification, providing a message broker, interfaces to create clients that produce or consume messages, and administrative services and control. Message Queue follows the JMS standard for routing and delivery functions, protocols, and message formats.

The Event Notification Service is a component bundled with Messaging Server and Sun Java System Calendar Server. It is a proprietary service that uses a publish/subscribe architecture for sending and receiving event notifications.

You can configure a notification producer for Message Queue, for the Event Notification Service, or for both services.
{info:title=Note}This chapter describes how to configure notifications for Message Queue only.{info}


For information about the Event Notification Service, see the [CommSuite:Communications Suite Event Notification Service Guide].{anchor:gcsho}

h2. Notification Plug-ins{anchor:indexterm-2180}

To enable Messaging Server to produce notifications to Message Queue or the Event Notification Service, you must configure a plug-in for that service:
* The JMQ notification plug-in allows you to deliver notification messages to the Message Queue broker.
* The iBiff plug-in allows you to publish notification events to the Event Notification Service.

For information on how to load the iBiff plug-in and configure the Event Notification Service, see “Appendix B: Administering Event Notification Service in Messaging Server,” in the _Sun Java System Messaging Server Administration Guide_.{anchor:gcshq}

h2. Benefits of Using JMQ Notification

The JMQ notification plug-in, with Message Queue, provides the following benefits:
* Message Queue implements the JMS standard.\\
* With Message Queue, you can produce messages to a _topic_ or a _queue_, or to both of these delivery methods. For a brief definition, see [Publishing to a Topic or a Queue|#gcshp].\\
* Message Queue offers enhanced load balancing during message distribution, especially when messages are produced to a queue.\\
* The JMQ notification plug-in allows you to configure up to five notification plug-ins. The different plug-ins can produce messages to a topic, to a queue, to the Event Notification Service, and so on. For details, see [Using Multiple JMQ Notification Plug-ins|#gcshl].\\
* You can configure notifications conditionally for a specific set of users instead of automatically sending notifications for all users, greatly reducing the total number of messages sent.\\
* You can configure notifications for different sets of users to be sent to different Message Queue systems, enhancing the scalability of the notification service.\\
* Message Queue provides reliable delivery of notifications.\\
For example, if you configure the JMQ notification plug-in to produce messages with the persistent flag enabled, the message remains in the Message Queue broker until a consumer receives it. The message is saved so that, if a server goes down, the message can be retrieved and made available to the appropriate consumer.\\{anchor:gcshp}

The following benefits are described below:
{toc:minLevel=4|maxLevel=4}

h4. Publishing to a Topic or a Queue

A topic and queue use different messaging delivery patterns; each one can be configured in a Message Queue service.

{anchor:indexterm-2181} _Topic._ When a message producer sends a message to a topic, a publish/subscribe architecture is used. In this broadcast pattern, a producer sends a message to a topic destination. Any number of consumers can be subscribed to this topic destination. Each consumer subscribed to the topic gets its own copy of the message. If no consumers are subscribed to the topic, the message is discarded.

The Event Notification Service also uses a publish/subscribe architecture; it is similar to the topic pattern defined in Message Queue.

{anchor:indexterm-2182} _Queue._ When a message producer sends a message to a queue, a point-to-point architecture is used. In this pattern, a producer sends a message to a queue destination from which only one consumer can receive it. If several consumers are waiting for messages from the queue, only one subscriber will receive the message. If no consumers are waiting, the message is held until either the message times out, or a consumer expresses an interest in the queue.

Producing messages to a queue allows you to spread the message load across multiple consumers.{anchor:gcshl}

h4. Using Multiple JMQ Notification Plug-ins{anchor:indexterm-2183}

You can configure from one to five notification plug-ins.

Messaging Server provides a plug-in library at the following default location:

{{/opt/SUNWmsgsr/lib/libjmqnotify}}

You use the {{configutil}} utility to specify parameters for a plug-in and to point the plug-in to the library of executable code.

If you specify more than one plug-in, each plug-in produces notification messages independently of the others. For example, if two plug-ins are configured with a delete-message parameter, and a message is deleted from a user's mailbox, both plug-ins will produce a notification message.

By configuring multiple plug-ins, you can take advantage of different message-distribution patterns for different purposes. For example, you could configure three different plug-ins to produce messages
* To a queue (using Message Queue)\\
* To a topic (using Message Queue)\\
* To the Event Notification Service\\{anchor:gcshv}

h4. Configuring Parameters for a Notification Plug-in

For each plug-in you configure, you must define a separate set of {{configutil}} parameters.

The parameters determine two kinds of information:
* The kinds of notification messages to produce. For example, enabling the {{LogUser}} parameter causes a notification message to be sent whenever a user logs in or out.\\
* Configuration information needed by Message Queue. For example, the {{jmqHost}} parameter identifies the IP address of the host where the Message Queue broker is running.\\

For instructions on how to configure a plug-in, see [To Configure a JMQ Notification Plug-in|Configuring a JMQ Notification Service (Task)#gcshh].{anchor:gcsia}

h4. Configuring Conditional Notifications for Specified Users

Suppose only a few users in your deployment use notifications. For example, you could have a million-mailbox deployment where 10,000 users have voice-mail notifications sent to their inboxes. Enabling notifications for all users would add unnecessary message traffic to the system.

You can configure notifications to be conditional, so that notifications are generated only for the specified users who require them. The conditional use of notifications can greatly reduce the total number of notifications sent, thus reducing the overall load on the system.

To set up conditional notifications, you do the following:
* Disable notifications for all users
* Enable notifications for those users with the LDAP attribute {{mailEventNotificationDestination}} added to their directory entries
* Ensure that this LDAP attribute is cached in queued mail messages

When a notification event occurs, Messaging Server looks up the user entry in the directory. If the LDAP attribute is present, a notification is sent to Message Queue. If not, no notification is generated.

For instructions on how to configure this feature, see [To Enable Conditional Notifications for Specified Users|Configuring a JMQ Notification Service (Task)#To Enable Conditional Notifications for Specified Users].

h4. Sending Conditional Notifications to Distributed Message Queue Destinations

You can configure notifications for different sets of users to be sent to different Message Queue destinations in a distributed Message Queue environment. For example, for one set of users, notifications can be routed to one Message Queue host; for a second set, notifications can be routed to another Message Queue host.

This feature enhances the scalability of the notification system by distributing notification messages to multiple Message Queue destinations.

It operates by extending conditional notifications, described in [Configuring Conditional Notifications for Specified Users|#Configuring Conditional Notifications for Specified Users]. Notifications are produced for users with the LDAP attribute {{mailEventNotificationDestination}} in their directory entries. You can associate this attribute with different names; depending on the name, the notification messages are sent to a particular Message Queue destination.

For instructions on how to configure this feature, see [To Configure Conditional Notifications to Be Sent to Different Message Queue Destinations|Configuring a JMQ Notification Service (Task)#To Configure Conditional Notifications to Be Sent to Different Message Queue Destinations].

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact