Setting Up the Enterprise Message Bank
This page describes how to define and configure the Enterprise Message Bank.
Basic Setup
In the namespace where you want to define the Enterprise Message Bank:
-
Create client configurations to enable connections to each production whose messages and event log entries you want to archive.
-
Create a production where the production class is Ens.Enterprise.MsgBank.ProductionOpens in a new tab or a subclass of that class. You can create the production in an IDE or create it using the Management Portal and then edit it in an IDE as follows:
-
In an IDE, open the class that defines the production.
-
Replace the class Ens.ProductionOpens in a new tab with Ens.Enterprise.ProductionOpens in a new tab. For example, if the class definition is
Class EMon.MsgBank Extends Ens.Production
Edit it so that the class extends Ens.Enterprise.ProductionOpens in a new tab so that it appears as:
Class EMon.MsgBank Extends Ens.Enterprise.MsgBank.Production
-
Compile the class.
-
-
Add the Ens.Enterprise.MsgBank.TCPServiceOpens in a new tab business service to the production and enable it. See Configuring the Message Bank TCP Service.
-
Add the Ens.Enterprise.MonitorServiceOpens in a new tab business service to the production and enable it.
Do not use the similarly named Ens.MonitorServiceOpens in a new tab.
-
Optionally add a message bank helper class to implement the search capability in the Message Bank.
-
Start the production.
-
Configure the Message Bank clients so that they will send messages.
Configuring the Message Bank TCP Service
After defining the Enterprise Message Bank production, you may need to perform additional configuration, described here.
Specifically, the Ens.Enterprise.MsgBank.TCPServiceOpens in a new tab component on the Message Bank server helps process the incoming messages from the Message Bank client productions. If you have created client configurations, the TCPService uses the information that you defined to associate the incoming message with the enterprise system. If you do not identify the enterprise systems, the monitor service identifies the incoming message based on the elements of the message.
There are two cases where there may be conflicting information to identify the enterprise system sending the message:
-
If the enterprise system has multiple IP addresses and the system restarts it may be sending messages from a different IP address. To instruct the Message Bank to recognize that these messages are coming from the same enterprise system as the earlier messages, select the Ignore Client IP Changes check box on the Ens.Enterprise.MsgBank.TCPServiceOpens in a new tab.
-
Although it is not a recommended configuration, it is possible to terminate an enterprise system and restart a new one with the exact same configuration and name but resetting the message IDs. Since the message IDs are not related to the ones in the messages sent by the previous enterprise system, the Message Bank should treat it as a new enterprise system. In this case you should clear the Ignore Client IP Changes check box on the Ens.Enterprise.MsgBank.TCPServiceOpens in a new tab.
The Ignore Client IP Changes check box does not affect how the Message Bank treats enterprise systems that are part of an InterSystems IRIS mirror set (see Mirroring Architecture and Planning).
Adding a Message Bank Helper Class
The Message Bank data is not stored in the typical Ens.MessageHeaderOpens in a new tab class, but is instead based on Ens.Enterprise.MsgBank.MessageHeaderOpens in a new tab, which does not have any additional indices associated with it. Consequently, by default, the message bodies cannot be searched.
To make the message bodies searchable, add a helper class. To do so:
-
Create a subclass of Ens.Enterprise.MsgBank.BankHelperClassOpens in a new tab and implement its OnBankMsg() method. See the class reference for details on the method.
The OnBankMsg() method specifies any custom processing to perform when inbound messages include a message body.
In your implementation of this method, you should decide whether to handle messages in process (and possibly reduce the input capacity), or whether the method should asynchronously forward the messages to a secondary process to balance the work more effectively.
-
In the Message Bank production, select the Ens.Enterprise.MsgBank.TCPServiceOpens in a new tab business service and specify the Bank Helper Class setting. For the value, use the name of your helper class.
Notes about the Message Bank
Note the following important characteristics of the Message Bank:
-
The Message Bank has no synchronization dependencies for message body classes with the contributing productions; therefore, it receives a serialized form of each message. For virtual document message bodies it reparses the serialized document into an object, and receives and stores the search table entries from the contributing production as well.
To enable searching by custom schema properties in the Message Bank, make sure to place the custom schema definition in the Message Bank production namespace.
-
For uniqueness, the Message Bank production prepends the numeric identifier of client productions to the message IDs.
-
The Message Bank page also serves as a portal for viewing the state of multiple client productions and for invoking a resend service on them. For these extra features to work, the Message Bank needs to know the web addresses of the client productions. For details, see Configuring the Message Bank TCP Service.
-
The Message Bank mechanisms do not delete the messages from the originating production; you should handle that function with a separate purge process.
-
It is possible to replay messages from the Message Bank back into the originating production or another client production. See Using the Enterprise Message Bank.