Mapping to a JMS Message Destination using the CDC Replication Engine for Event Server
Before you can use the CDC Replication Engine for Event Server to transform table data in XML, you must install and set up a CDC Replication source product that can scrape row-level operations (inserts, updates, and deletes) from your source database.
The CDC Replication Engine for Event Server receives replicated row-level operations (inserts, updates, deletes) from your source database and transforms these rows into XML.
Using Management Console, you can map source columns to XML elements and attributes. When you start mirroring and if there is a row-level operation on your source table, the CDC Replication Engine for Event Server receives and applies the row-level operation to the XML document which is sent to a JMS message destination (queue or topic).
The CDC Replication Engine for Event Server is a target-only product. This means that the CDC Replication Engine for Event Server can only receive row-level and table-level operations already replicated from another supported CDC Replication product that you have installed. You must install another CDC Replication product and connect to this datastore so that you can select the source tables you want to make available for replication. You can then continue to add a subscription that uses the CDC Replication Engine for Event Server as the target datastore.
- Message destination mappings—Allows you to map a source table to a JMS message destination. In this method, the CDC Replication Engine for Event Server receives the row-level operation (insert, update, or delete) and transforms it into a row that is inserted into an XML message. The Message Destination Mappings mapping type option is available in the Map Tables wizard. When you map a source table to a message destination, the CDC Replication Engine for Event Server receives the row-level operation and transforms this row into XML. This XML message is sent to a JMS application supported by the CDC Replication Engine for Event Server.
- Custom table mapping:
- Regular—You can stage your source table in an embedded target staging database using the Standard mapping type provided with the CDC Replication Engine for Event Server. In this method, the standard mapping type creates an exact copy of your source table in the staging database and to a JMS message destination. The CDC Replication Engine for Event Server receives the row-level operation from the staging database and transforms it into XML. When you select the Custom Table Mapping option in the Map Tables wizard and choose Standard, the wizard lets you map your source table to a target table available in an embedded staging database provided with the CDC Replication Engine for Event Server. The CDC Replication Engine for Event Server provides an embedded staging database as a temporary repository for your source table before it is transformed to XML. You may want to map your source table to a target staging table in order to customize the source table outside of your production database in some way before the CDC Replication Engine for Event Server converts the replicated rows into XML. Also, by mapping the source table to a staging database, you can reduce performance overhead on your production database. The CDC Replication Engine for Event Server depends on the staging database (instead of your production database) to receive and transform replicated rows into XML.
- LiveAudit—If you want your target table to keep an audit trail of operations applied to the source table, then use the Map Tables wizard to map your source and target tables using LiveAudit.
- Adaptive Apply—Adaptive Apply ensures that replicated rows in the source and target tables are the same. You can also use Adaptive Apply to restore the contents of a target table from recorded journal or log entries. To do this, you set the journal or log position to a specific entry or point in time, and then use Adaptive Apply to populate an empty target table with the latest data.
Setting mapping details on a subscription that targets a JMS Message destination
Management Console lets you create an XML message for subscriptions that target JMS message destinations. In addition to the existing mapping details that you can configure with other CDC Replication products you install, Management Console provides additional configuration details available only with subscriptions created with the CDC Replication Engine for Event Server:
- XML Message—Use this tab to create your XML message, import and export mapping projects, import and export XML schemas, build XPath expressions, and query columns from other tables if required.
- XML Settings—Use this tab to set JMS message header properties and set general runtime options.
As with other CDC Replication products, the Filtering tab, the Translation tab, and the User Exits tab are available for configuration with the CDC Replication Engine for Event Server. The Column Mappings tab and the Operations tab are only available if you have mapped your source table to a target staging table.
- Column Mapping —Use this tab to map
source columns to columns in a target staging table. The CDC Replication Engine for Event Server provides
an embedded staging database as a temporary repository for your source
table before it is converted into XML. This tab is only available
if you have mapped your source table to a target staging table using
the Standard mapping type in the Map
Tables wizard. You may want to map your source table to
a target staging table when:
- You want to customize the source table outside of your production database. Before mapping your source table to a JMS message destination, you can map your source table to a target staging table in order to send a copy of the source table to the staging database. Using the Column Mappings tab, you can decide on the source columns you want to map (or unmap) from columns in the target staging table. This lets you control which columns you want to include or exclude for replication and therefore the kind of data you want to include or exclude for the CDC Replication Engine for Event Server to XML.
- You want to reduce performance overhead on your production database. Because you have mapped your source table to a target staging table, when you start replication, a copy of your source table is sent to the staging database. In this scenario, the CDC Replication Engine for Event Server receives replicated rows from the staging database (instead of your production database) and transforms these rows into XML. This setup reduces performance overhead on your production environment.
- Filtering—Use this tab to include or exclude rows or columns for replication.
- Translation —Depending on how you have mapped your source table, you can use this tab to add a data translation between your source and target staging columns and set encoding conversions or both. You can only set a data translation on a subscription for source columns that are mapped to target staging columns. When you add a data translation and start replication, the supported CDC Replication source product translates values from the source column into the new value you specified for the mapped target column. The CDC Replication Engine for Event Server then inserts the translated value into an XML document.
- Encoding—Use this tab to view and set encoding options. For CDC Replication version 6.3 and earlier, Management Console provides standard character sets and encodings. To add additional character sets and encodings, use the CSV (comma separated variable) template that is found in the Advanced preferences of . This step is not necessary for CDC Replication version 6.5 or later, which retrieves the supported encodings directly from your datastores.
- Conflicts—Use this tab to detect, log, and act on inconsistent data on the target. This ensures your replication environment handles data conflicts automatically and in accordance with your business rules. Set conflict detection so that CDC Replication can detect and resolve conflicts as they occur. As conflicts are detected and resolved, CDC Replication logs them in a conflict resolution audit table.
- Operation—Use this tab to control how the CDC Replication Engine for Event Server applies row-level operations (insert, update, and deletes) and table-level operations (truncate/clear) to the target staging table. This tab is only available if you have you have mapped your source table to a target staging table using the Standard mapping type in the Map Tables wizard.
- User Exits—Use this tab configure a user exit for the CDC Replication Engine for Event Server. User exits define a set of actions that you want the CDC Replication Engine for Event Server to run either before or after applying a row-level operation. Depending on how you have mapped your source table, the CDC Replication Engine for Event Server can run the user exit before or after applying a row-level operation to the target staging table, run the user exit before or after applying a row-level operation to the JMS message destination, or both. Row-level operations include an insert, update, or a delete.