19 Administering Event Notification Service

This chapter describes how to enable the Event Notification Service Publisher (ENS Publisher) and how to administer the Event Notification Service (ENS) in Unified Configuration.

See "Messaging Server Specific Event Notification Service Information" and "Event Notification Service C API Reference" for more information on ENS and ENS APIs.

ENS Publisher in Messaging Server

The Event Notification Service (ENS) is the underlying publish-and-subscribe service. ENS acts as a dispatcher used by Communications Suite applications as a central point of collection for certain types of events that are of interest to them. Events are changes to the value of one or more properties of a resource. Any application that wants to know when these types of events occur registers with ENS, which identifies events in order and matches notifications with subscriptions. ENS and the ENS publisher are bundled with Oracle Communications Messaging Server.

Configuring the ENS Publisher in Unified Configuration

ENS has the following default behavior:

  • ENS is enabled by default. The initial configuration sets the ens.enable option to 1.

  • No configuration is required to load the ENS publisher because the ms-internal instance is automatically loaded and configured. Therefore, you do not need to create a separate ms-internal instance.

  • If you want to configure options for the pre-loaded ms-internal default instance, set them with the ms-internal instance name. For example, notifytarget:ms-internal.settings.

  • IMAP IDLE now only works using ENS, because the ability to use IMAP IDLE with JMQ has been removed.

  • The notifytarget:ms-internal.enshost defaults to base.listenaddr if it is not set.

Administering Event Notification Service

Administering ENS consists of starting and stopping the service, and changing the options to control the behavior of the ENS publisher.

Starting and Stopping ENS

If desired, you can use the start-msgens and stop-messageens commands to start and stop the ENS server.

Event Notification Service Configuration Options

The notifytarget:target.* options control the behavior of the publisher. Use the msconfig set command to set these options. For a list of options, see Messaging Server Reference.

To enable ENS, make sure that the ens.enable option is set to 1, for example:

/opt/sun/comms/messaging64/bin/msconfig set ens.enable 1
/opt/sun/comms/messaging64/bin/msconfig show ens.enable
role.ens.enable = 1

ENS SSL Support

ENS supports SSL in a separate default port 8997. Use the following configuration options to manage ENS SSL support.

To enable or disable SSL support for ENS:

  • ens.enablesslport (Unified Configuration)

  • local.ens.enablesslport (legacy configuration)

To change the ENS sslport:

  • ens.sslport (Unified Configuration)

  • local.ens.sslport (legacy configuration)

To add sslnicknames:

  • ens.sslnicknames(Unified Configuartion)

  • local.ens.sslnicknames (legacy configuration)

To make a notification target to use TLS/SSL:

  • notifytarget:target-name.ensusessl (Unified Configuration)

  • local.store.notifyplugin.target-name.ensusessl (legacy configuration)

Both SSL and non-SSL ports can be enabled for ENS at the same time. The ENS notification targets can use TLS/SSL for it's communication with the ENS broker.

The notification targets of type, ENS, can use TLS/SSL to communicate with the ENS broker specified.

The default value of the option notifytarget:target-name.ensusessl will be 1, if ens.enablesslport is 1 and one of the following conditions is satisfied:

  • The notifytarget is the ms-internal plugin

  • The value of the notifytarget:target-name.enshostis not set

  • The value of notifytarget:target-name.enshostis equal to the value of service.listenaddr

  • The value of notifytarget:target-name.enshost is the loopback address, "127.0.0.1" or "::1"

If the ensusessl option of the notifytarget is set, then the TLS/SSL will be used to communicate with the host defined by the options ensHost and ensPort, in the notifytarget plugin.

The default value of the option:

  • notifytarget:target-name.ensport (Unified Configuration)

  • local.store.notifyplugin.target-name.ensport (legacy configuration)

will be equal to the value of ens.sslport if the value of notifytarget:target-name.ensusessl is 1. Otherwise, it will be equal to the value of ens.port.

ENS Support for Password Based Authentication

Use the following configuration options to support password-based authentication to the ENS server.

  1. Option to Enable/Disable authentication (ens.mustauthenticate).

  2. Option to change the secret for authentication (ens.secret).

  3. Option to specify username for the ENS notifyplugin (notifytarget:target-name.ensuser)

  4. Option to specify password for the ENS notifyplugin (notifytarget:target-name.enspwd)

Password based authentication of the ENS clients to the broker is enabled, by setting the option, mustauthenticate.

The option:

local.ens.mustauthenticate (legacy configuration)

or

ens.mustauthenticate (Unified Configuration)

enables or disables whether authentication is required by the ENS broker. The default value of the ens.mustauthenticate option is 0.

If mustauthenticate option is set, authentication is required by the ENS broker in both SSL and non-SSL ports.

The ENS broker accepts any user name but the password for authentication is set by the option:

local.ens.secret (legacy configuration)

or

ens.secret (Unified Configuration)

There is no default value for ens.secret. If mustauthenticate is set, authentication is required by the ENS Broker on both SSL and non-SSL ports. The password for authentication can be set with the ens.secretoption. All connections to the ENS Broker will fail unless the ens.secret is set with a password.

The notification targets of type ENS can be made to use password based authentication.

The userid for authentication is set using the option:

local.store.notifyplugin.target-name.ensuser (legacy configuration)

or

notifytarget:target-name.ensuser (Unified Configuration)

The default value of the option, ensuser is "guest."

The password for authentication to ENS broker in a notification target is set using the option:

local.store.notifyplugin.target-name.enspwd (legacy configuration)

or

notifytarget:target-name.enspwd (Unified Configuration)

There is no default value for enspwd. The value of the option enspwd will be equal to the value of option ens.secret, if one of the following conditions satisfies:

  1. The notification is the ms-internal plugin.

  2. The value of notifytarget:target-name.enshost is NULL.

  3. The value of notifytarget:target-name.enshost is equal to the value of service.listenaddr

  4. The value of notifytarget:target-name.enshost is the loopback address, "127.0.0.1" or "::1".

If the ensuser and enspwd are provided, then the notifytarget figures out whether the ENS broker that it connects to require password based authentication or not. If the ENS broker that the notify target connects requires a password, then the password provided will be used or else it won't be used.

With the newer version of the ENS broker that uses authentication with ens.mustauthenticate set to 1, you must set a password using the ens.secret option. Otherwise all connections to the ENS broker will fail. If authentication is disabled with ens.mustauthenticate set to 0, the older version of the ENS broker which does not have authentication will be used. By default, authentication is disabled.

Note:

If you use the older ENS Client APIs with the newer ENS broker (i.e. authentication enabled), it will not work. When authentication is enabled, using ENS will require setting of the option, local.ens.secret and use of newer API, ens_sopen.