Introduction to Event Publishing

Event Publishing captures changes to source tables and converts committed transactional data to messages in an XML or delimited format. Each message can contain an entire transaction or only a row-level change. These messages are put on IBM® MQ message queues and read by a message broker or other applications. You can publish subsets of columns and rows from source tables so that you publish only the data that you need.

You can use Event Publishing for a variety of purposes that require published data, including feeding central information brokers and Web applications, and triggering actions based on updates, inserts, or deletes to source tables.

Source tables can be on DB2® servers on Linux, UNIX, Windows, or z/OS®. To make use of MQ message queues for transporting data, have MQ available on your source and on the system where messages are received. Views are not supported as sources.

Event Publishing can be very useful in a variety of different applications. Consider a scenario in which changing prices and inventory are published to potential buyers. For example, a food wholesaler procures perishable food products such as bananas from world markets in bulk and sells them to grocery food retailers and distributors.

The value of bananas decreases the longer that they are in the warehouse. The wholesaler wants to inform its potential buyers of the changing price and inventory data and can set up Event Publishing to do just that. Each time the price changes, an XML or delimited message can be sent to potential buyers, informing them of the "price change event."

Each buyer (retailer or distributor) wants to maximize profit. These organizations can determine when to buy the bananas based upon price, age (or time to spoil), and historical knowledge regarding how quickly they can sell a certain quantity. If they purchase too early, they will pay a higher price for the bananas and will not achieve the maximum profit. Buying too late will likely result in spoilage and again profit will not be maximized. Profit maximization can be achieved by timing the purchase appropriately. Applications can receive the event notification messages and generate purchase orders automatically at the right time to maximize profit.

The following figure shows a simple configuration in Event Publishing. The topics listed above each highlight and describe different sections of this figure.

Figure 1. A simple configuration in Event Publishing
A simple configuration in Event Publishing.