Kourier Integrator Online Help
This guide describes the Kourier messaging architecture and how it exchanges information between applications. An application consists of any system that provides or consumes data. Examples of applications include DataFlo, Prelude, Eclipse, KommerceServer, SQL Server, and CRM systems.
Kourier is used to send messages to third party applications. The messages are generated from records in your U2 system and placed in a queue. Kourier then moves them to a target DSN. The application picks up messages from the target DSN and processes them. This processing typically creates or updates one or more data records in the application. Likewise, an application sends messages to your U2 application by placing them in a source DSN. Kourier picks up these messages and places them in a queue. Messages are picked up from the queue and processed into your U2 application, creating or updating records as required. An example of a system that does both is shown in Figure 1.
Figure 1.
Kourier uses queues to prevent the loss of messages. It may be impossible to deliver a message when a server is down for maintenance or during network outages. Kourier temporarily stores messages in queues until they are safely delivered to the application.
Once a message is placed in a queue, it is not removed until it is properly processed. The only time messages will not be delivered to an application is if Kourier never regains access to it.
It is important to note also that Kourier, like other queuing systems, does not guarantee that all messages will be properly processed by the receiving application. It is the programmer's responsibility to ensure that messages are only removed from the queue after they are completely processed by the application.
The part of the message that contains the primary bulk of the data being exchanged is called the message body. A message can contain any format that is understood by both the sending and receiving application. When exchanging data with larger, more complex applications, there will be several different message formats to describe the different types of data being exchanged. Common message formats include XML and tab-delimited ASCII, but the details of each format is to be determined by the programmer.
Messages generated by an application typically consist of:
A DSN is a special type of queue that typically resides outside of your U2 server and within the scope of a third party application. Some systems refer to these as "inboxes" and "outboxes." An application places outgoing messages in a source DSN to be retrieved by Kourier. When Kourier retrieves a message from a source DSN, it removes the message from the source DSN and places it in the Kourier queue. For performance reasons, it typically moves more than one message at a time. Likewise, when Kourier sends a message from your U2 Server to the application, it places it in the target DSN. The application then picks up the message from the target DSN and processes it. Messages are delivered in the order in which they are placed in the queue. Refer to the Kourier DSN Guide for more information.
When a message is placed in a Kourier queue, it is given a header that contains information that describes the message and possibly how the message is to be processed. Every message includes headers for the date and time the message was placed in the queue. The messages will have others that will vary depending on the class of the source or target DSN.
Most queuing applications have generally the same design. While the specifics of each step may vary, the flow is generally the same:
The sending application generates messages.
Messages are transferred to the receiving application.
Each message gets processed into the receiving application.
Applications generate messages in a variety of ways. You can use Kourier's export feature to generate data from U2 Server, or you can write a service command or filter routine to do it. For third-party applications, you can use whatever means available to generate messages in the environment of the sending application.
The way that messages are transferred depends primarily on whether they originate in your U2 application or in a third-party application. When sending messages from your U2 Server to an application, they are first placed in a queue. The message is then moved to the target DSN for the application. This process is shown in Figure 2.
Figure 2.
The process is similar when a third application sends messages to your U2 Server. The application generates the message and puts it in the source DSN for the application. Kourier then moves the message from the source DSN to the Kourier queue. This process is shown in Figure 3.
Figure 3.
Messages received by application can be processed using Kourier's import feature as part of a service to create and update records. You can also write a service command or filter routine to do it if your requirements are more complex. For third-party applications, you can use whatever means available to generate messages in the environment of the receiving application.
To provide an overall view of how messages are exchanged between applications, Figure 4 shows how messages are exchanged between DataFlo (a U2-based ERP system) and KommerceServer (a SQL-based eCommerce system):
Figure 4.