Quercus Message Link Developer’s Guide<>

Message controls

The message table

The message table registers the different types of message available in Quercus, e.g. BioData(In), BioData(Out), Enrolment(Out).

It also is used to record:

the direction of the message, IN or OUT

whether or not the message is enabled

whether or not the message is a system message, that is, a baseline message

The message table name is APIWS_MESSAGE.

Below is a brief description of the APIWS_MESSAGE table columns.

Column name

Format

Description

Object_Id

number

Internal Quercus record identifier

Timestamp

date

Timestamp when the record was created

Message_Type

Character(30)

The code name for the message – e.g. ‘PERSON_BIO_OUT’

Direction

Character(3)

The direction of the message. It can be either ‘IN’ or ‘OUT’

Root_Element_Name

Character(30)

The core table that initiates the message, for example a PERSON_BIO_OUT message will contain information about the person including addresses and reference numbers but the root element is PERSON therefore the root element name is set to ‘PersonBioData’.

Package_Name

Character(30)

The name of the database package that is used to handle the creation or processing of the message. Example: ‘APIWS_DOM_PERSON’ deals with all messages for BioData.

Method_Name

Character(30)

What method is being used for the message? If the message is being generated from Quercus then the method is usually ‘Create_Message’ however if the message is being received into the Quercus database then the method is usually ‘Process_Message’

Enabled

Character(1)

Is the message enabled (Y) or disabled (N). By Default all messages are enabled.

System

Character(1)

Is the message a system message (Y) or not (N). Administrators can create their own custom messages and register them with Quercus Messaging. By default custom messaging are not system.

The Message Link queues

Three queues are used to handle all messages into and out of Quercus, one inbound queue and two outbound queues. See section 1.5.3 and 1.5.4 for message processing details.

Queue name

Description

MESSAGE_IN

This queue processes all inbound messages. The message listener polls this queue at intervals checking if any new messages are available. If a new message is found than it is dequeued and propagated to the appropriate database tables.

TRANSACTION_OUT

This queue acts as the primary queue for all outbound messages. Any events that trigger the creation of a new message are first recorded in this queue. A message dispatcher polls this queue at regular intervals checking for new transactions.

MESSAGE_OUT

This queue processes all outbound messages. The message dispatcher collects all available information from the TRANSACTION_OUT queue for a given object and then creates one message for that object. The message is then enqueued in this queue awaiting the ESB to dequeue it.

Two other queues exist on the database which are used in the processing of inbound and outbound messages.

Queue name

Description

HOSPITAL

This queue is used as a bin for all failed inbound messages. If for any reason Quercus Message Link cannot process a message that has been queued then that message is queued into the hospital queue. System administrators can view the hospital queue with Message Link Monitor and take remedial action to fix the messages.

MESSAGE_OUT_RECEIPT

When a message is dequeued from the MESSAGE_OUT queue using the QML Rest Protocol that message is automatically queued to the MESSAGE_OUT_RECEIPT queue for a user-defined time. If the system receives a receipt message to acknowledge receipt of message from the third party system then the message is deleted otherwise it is requeued to the MESSAGE_OUT queue.

The Message Link controller

A purpose built package to allow an administrator to control the behaviour of the message link system is supplied as part of Message Link. The package name is APIWS_CONTROLLER.

The package has a number of easy to use procedures that allow an administrator control how messages handled in the system. A brief description of each public procedure in the package is described below:

Function

Description

Example usage

Enable_Message

Allows the administrator to enable a given message.

The message type is passed as a parameter to this procedure.

apiws_controller.enable_message (‘PERSON_BIO_OUT’)

Disable_Message

Allows the administrator to disable a given message.

The message type is passed as a parameter to this procedure.

apiws_controller.disable_message (‘PERSON_BIO_IN’)

Enable_Queue

Allows the administrator to enable the queue.

The queue name is passed as a parameter to this procedure.

apiws_controller.enable_queue (‘MESSAGE_IN’)

Disable_Queue

Allows the administrator to disable the queue.

The queue name is passed as a parameter to this procedure.

apiws_controlloer.disable_queue (‘MESSAGE_OUT’)

Enable_Outbound_Propagation

Allows the administrator to enable the propagation of all outbound messages.

apiws_controller.enable_outbound_propagation

Disable_Outbound_Propagation

Allows the administrator to disable the propagation of all outbound messages.

This is useful during periods of high activity where you may not want messages to be propagated from the system.

apiws_controller.disable_outbound_propagation

Reschedule_Propagation

Allows the administrator to schedule the time interval in seconds at which outbound messages are propagated.

The default is 30 seconds.

The time in seconds is passed as a parameter.

Values between 1 and 999 are accepted otherwise the default value is used.

apiws_controller.reschedule_propagation(60)

Enable_Inbound_Listener

Allows the administrator to enable the message listener to accept all inbound messages.

apiws_controller.enable_inbound_listener

Disable_Inbound_Listener

Allows the administrator to disable the message listener from accepting all inbound messages.

apiws_controller.disable_inbound_listener

Reschedule_Listener

Allows the administrator to schedule the time interval in seconds at which the message listener checks for inbound messages.

The default is 30 seconds.

The time in seconds is passed as a parameter.

Values between 1 and 999 are accepted otherwise the default value is used.

apiws_controller.reschedule_listener(60)

By default all messages are installed disabled. This is to prevent the database queues being populated immediately after installation so as to allow a controlled switch to the propagation of messages.