Skip to main content

Defining an Enterprise Message Bank

This page describes how to define an optional, specialized kind of production called the Enterprise Message Bank.

After you have defined the Enterprise Message Bank, see Configuring the Enterprise Message Bank and Its Clients.

Enterprise Message Bank Overview

The Enterprise Message Bank is an optional remote archiving facility where you can collect messages, Event Log items, and search table entries from multiple client productions. It consists of the following components:

  • The Message Bank server, which is a simple production consisting exclusively of a Message Bank service that receives submissions from any number of client productions.

  • A client operation (the Message Bank operation) that you add to a production and configure with the address of a Message Bank server.

The following shows a conceptual example:

Diagram of a Message Bank Production receiving input from Message Bank operations in three different productions

So that you can conveniently see the messages in the Message Bank, InterSystems IRIS® data platform provides the following additional options:

  • For the Message Bank instance, the Management Portal automatically includes the Enterprise Monitor pages, where you can monitor the status of client productions, browse the Message Bank, and perform a search of messages from the monitored clients.

  • You configure each client production to send messages and to include a convenient link to the Enterprise Monitor.

The following shows an example:

Diagram of an Enterprise Monitor receving input from three different servers

Defining the Message Bank Server

To define the Message Bank server, do the following on the server machine, in an interoperability-enabled namespace:

  1. Create a subclass of the Ens.Enterprise.MsgBank.ProductionOpens in a new tab abstract class.

  2. Copy its ProductionDefinition XData block into your class.

  3. Compile your new class.

The following shows an example:

Class MyMessageBank Extends Ens.Enterprise.MsgBank.Production

XData ProductionDefinition
<Production Name="Ens.Enterprise.MsgBank.Production" TestingEnabled="false" LogGeneralTraceEvents="false">
  <Description>Production for receiving and collating message bank submissions from one or more client
   interoperability-enabled namespaces and for maintaining a local repository of production status information about each
   client namespace, for display on the Enterprise Monitor page. Open the Monitor page on the same
   machine that that is hosting this Production.</Description>
  <Setting Target="Production" Name="ShutdownTimeout">120</Setting>
  <Setting Target="Production" Name="UpdateTimeout">10</Setting>
  <Item Name="MonitorService" Category="" ClassName="Ens.Enterprise.MonitorService" PoolSize="1"
        Enabled="true" Foreground="false" InactivityTimeout="0" Comment="Populates global
        ^IRIS.Temp.Ens.EntMonitorStatus by polling namespaces from Systems List every CallInterval seconds"
        LogTraceEvents="false" Schedule="">
    <Setting Target="Host" Name="AlertGracePeriod">0</Setting>
    <Setting Target="Host" Name="AlertOnError">0</Setting>
    <Setting Target="Host" Name="ArchiveIO">0</Setting>
    <Setting Target="Adapter" Name="CallInterval">10</Setting>
  <Item Name="MsgBankService" Category="" ClassName="Ens.Enterprise.MsgBank.TCPService" PoolSize="100"
        Enabled="true" Foreground="false" InactivityTimeout="20" Comment="" LogTraceEvents="true" Schedule="">
    <Setting Target="Host" Name="AlertGracePeriod">0</Setting>
    <Setting Target="Host" Name="AlertOnError">0</Setting>
    <Setting Target="Host" Name="ArchiveIO">0</Setting>
    <Setting Target="Adapter" Name="Endian">Big</Setting>
    <Setting Target="Adapter" Name="UseFileStream">0</Setting>
    <Setting Target="Adapter" Name="JobPerConnection">1</Setting>
    <Setting Target="Adapter" Name="AllowedIPAddresses"></Setting>
    <Setting Target="Adapter" Name="QSize">100</Setting>
    <Setting Target="Adapter" Name="CallInterval">5</Setting>
    <Setting Target="Adapter" Name="Port">9192</Setting>
    <Setting Target="Adapter" Name="StayConnected">-1</Setting>
    <Setting Target="Adapter" Name="ReadTimeout">10</Setting>
    <Setting Target="Adapter" Name="SSLConfig"></Setting>


This production has the following services:

This production receives this data and maintains a local repository.

For testing purposes, you can put the Message Bank production on the same machine and instance as your regular productions, but it must be in a separate namespace from any production you plan to monitor.

Adding a Message Bank Helper Class

By default, the message bodies are not indexed and cannot be searched. You can add a helper class to implement the search capability in the Message Bank. To do so:

  1. 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.

  2. 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 Enterprise Message Bank.

  • 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.

FeedbackOpens in a new tab