Connectivity is a system for transferring messages asynchronously between applications over the Connectivity Out Message Box and In Message Box. The transfer can take place between an Out Message Box and an In Message Box in the same database or an Out Message Box and an In Message Box in different databases. Messages in the Out Message Box can also be transferred over the file system or by some third party tool. Read more About Connectivity
When the method for transferring data from the Out Message Box is activated the method wakes up at a configured interval (default 30 seconds). All messages in the Out Message Box with a receiver defined in Message Receiver and an Installation Site associated with the receiver is transferred. One process will be initiated for each receiver with messages in the Out Message Box ready to be transferred.
The method Out_Message_Util_API.Transfer_Data__
is used to transfer
the data. The method is by default started in the system default batch queue. If
there is heavy use of the default batch queue the method can be moved to another
queue. This is done by the system administrator in Foundation1 – Administration
– Batch Queue.
When the method for processing the In Message Box is activated the method wakes up at a configured interval (default 30 seconds). For all new messages in the In Message Box the process looks for a method in Message Class. If a method is found the method is started and the message is handed to the method for processing. One process is started for each message. If no batch queue is registered for the method the process will be started in the system default batch queue.
The process Connectivity_SYS.Process_Inbox__
monitors the In Message
Box and executes processes for each arriving message. Incoming messages are processed
sequentially by Connectivity. This doesn’t mean that the processing of a message
is delayed until a previous message has finished processing. Depending on the queue
configuration several processes may be running in parallel. If more then one process
is allowed to be executing a later arriving message may finish processing before
an earlier arriving message although the processing of the first arriving message
has started first. This can happen when different messages have different processing
time. If messages are depending on each other then they have to be directed to a
queue where only one process is allowed at any time.
Two messages arrive, one with a new order and the second with a change of the
same order. Processing of the first message containing the new order always starts
first. If the message containing the order change is allowed to start before the
first message has finished, processing the order change might fail because the new
order is not committed to the database yet. Even if the two messages are created
at different times, they may arrive at the same time depending on the configuration
of the Connectivity_SYS.Process_Outbox__
on the sending site.
The background processes are not executing continuously. The time interval may be short but there is always a possibility that several messages are transported in the same transaction. They will always be inserted in the In Message Box on the receiving side in the correct order but processing might overlap as explained above. A proper configuration of the executing queues will guarantee that messages are processed correctly.
A message is stored in two tables, In_Message_TAB containing header information used by Connectivity and the receiving application and In_Message_Line_TAB containing the actual message data.
Field |
Type |
Length |
M |
PK |
FK |
Comment |
---|---|---|---|---|---|---|
MESSAGE_ID |
N |
Ö |
Ö |
Generated key |
||
RECEIVER |
V |
255 |
Ö |
Message receiver |
||
SENDER |
V |
255 |
Ö |
Message sender |
||
SENDER_MESSAGE_ID |
V |
255 |
Ö |
|||
APPLICATION_MESSAGE_ID |
V |
255 |
||||
RECEIVED_TIME |
D |
Ö |
Date received in inbox (sysdate) | |||
TRANSFERRED_TIME |
D |
Date transferred to application | ||||
VERSION |
V |
255 |
Ö |
Message version (1.0) |
||
ERROR_MESSAGE |
V |
255 |
||||
CLASS_ID |
V |
30 |
Ö |
Ö |
Message type |
|
CONNECTIVITY_VERSION |
V |
255 |
Ö |
(2.1.0) |
||
SENDER_ID |
V |
255 |
Ö |
(N/A) |
||
ROWVERSION |
D |
Ö |
(sysdate) |
|||
ROWSTATE |
V |
30 |
The columns in bold are used by Connectivity. The other columns can be used by the receiving application. If the message has been transferred by SQL*Net from an OutMessageBox on another site the SENDER_ID column contains the MESSAGE_ID in the OutMessageBox from where the message was sent. The column VERSION can be used by the receiving application to identify different versions of the same message type, CLASS_ID. The column CONNECTIVITY_VERSION is for internal use but is not used presently.
Data is stored in two tables, Out_Message_TAB
containing header
information used by Connectivity and Out_Message_Line_TAB
containing
the actual message data.
Field |
Type |
Length |
M |
PK |
FK |
Comment |
---|---|---|---|---|---|---|
MESSAGE_ID |
N |
Ö |
Ö |
Generated key |
||
SENDER |
V |
255 |
Ö |
Message sender |
||
EXEC_TIME |
D |
255 |
||||
APPLICATION_MESSAGE_ID |
V |
255 |
Ö |
|||
APPLICATION_RECEIVER_ID |
V |
255 |
Ö |
|||
VERSION |
V |
255 |
Ö |
Message version |
||
ERROR_MESSAGE |
V |
255 |
||||
CLASS_ID |
V |
30 |
Ö |
Ö |
Message type |
|
MEDIA_CODE |
V |
30 |
||||
RECEIVER |
V |
30 |
Ö |
Ö |
Message receiver |
|
FORMAT_CODE |
V |
30 |
||||
SESSION_ID |
V |
30 |
Internal use |
|||
CONNECTIVITY_VERSION |
V |
255 |
Ö |
(N/A) |
||
ROWVERSION |
D |
Ö |
||||
ROWSTATE |
V |
30 |
The columns in bold are used by Connectivity. The other columns can be used by the receiving application. The column VERSION can be used by the receiving application to identify different versions of the same message type, CLASS_ID. The columns MEDIA_CODE, FORMAT_CODE and CONNECTIVITY_VERSION is for internal use but is not used presently.
Field |
Type |
Length |
M |
PK |
FK |
Comment |
---|---|---|---|---|---|---|
MESSAGE_ID |
N |
Ö |
Ö |
Ö |
||
MESSAGE_LINE |
N |
Ö |
Ö |
|||
NAME |
V |
255 |
Ö |
|||
ERROR_MESSAGE |
V |
255 |
||||
C00 – C99 |
V |
2000 |
Message data |
|||
N00 – N99 |
N |
Message data |
||||
D00 – D39 |
D |
Message data |
||||
ROWVERSION |
D |
Ö |
||||
ROWSTATE |
V |
30 |
The columns in bold are used by Connectivity. The other columns can be used by the receiving application.
Select a message from Out_Message_TAB for Receiver/ClassId where Rowstate = ‘Released’.
Update the message head (Out_Message_TAB). Set Rowstate = ‘Processing’, Rowversion = sysdate and commit the transaction.
Process the message lines (Out_Message_Line_TAB).