RDBMS event publisher is used to publish events in map format to a RDBMS in two execution modes, which are insert and update-insert.
Follow the steps below to set up the prerequisites before starting the configurations.
Create a datasource to connect to the selected database. For instructions on creating a datasource, see Adding Datasources.
If selected database is H2, uncomment the following H2 database configurations in the
<PRODUCT_HOME>/repository/config/carbon.xmlfile as follows, to browse through the database and see the changes. Keep the other properties of the
Creating a RDBMS event publisher
For instructions on creating a RDBMS event publisher, see Configuring CEP to Create Alerts.
Configuring global properties
You can change the queries used to perform the standard database operations by adding the customised queries in the
<CEP_HOME>/repository/conf/output-event-adapters.xml file. This enables you to use RDBMS database types that use different queries. Customised values can be defined for the following used in standard queries.
Custom properties cannot be added as global properties.
Configuring adapter properties
Specify the Static Adapter Properties, when creating a RDBMS event publisher using the management console as shown below.
After entering the above adapter properties, select the Message Format that you want to apply on the published events. Also, click Advanced to define custom output mappings based on the Message Format you selected. For more information on custom output mapping types, see Output Mapping Types.
You can also define the respective adapter properties of the event publisher based on the transport type within the
<to> element of the event publisher configuration in the
<PRODUCT_HOME>/repository/deployment/server/eventpublishers/ directory as follows.
The above adapter properties are described below.
|Configuration file Property||Example|
|Data Source Name||Name of the datasource|
|Table Name||Name of the table|
|Execution Mode||Type of the execution mode|
|insert/update or insert|
|Composite key columns|
Attributes used for uniqueness checks for updates. Use commas to separate if you enter more than one attribute.
It is required to enter one or more attributes as composite key columns if you select
For more information on
rdbms event publisher type, see the following sample.