Publication Options Tab

In Publication Service, you can use the Publication Options tab to select a polling method, select a storage mode, specify a publishing table, and so on.

The following table lists and describes the fields, which are grouped in two panels:

Field Description
Publication Service Base Information Panel
Polling Method Publication Service uses the following two methods to monitor changes to a database table:
  • Timer (default setting): used to retrieve records from the database in a specified time. This specified time can be set in the Polling Interval field.
  • Alerter (Only available when using Oracle and Microsoft SQL Server databases): used to asynchronously notify running Publication Service of database changes. Use the alerter method only when database changes are infrequent.
Polling Interval Specifies how often the adapter checks the publishing table for new rows, in milliseconds. The default value is 5000 ms, or once every five seconds.
Note: If you select Alerter from the Polling Method list, the Polling Interval field is not displayed.
Use Polling Batch Size Select this check box to determine whether you want to poll rows in a batch or not. By default, the Use Polling Batch Size check box is selected.
Polling Batch Size(Maximum Rows) This field is displayed when the Use Polling Batch Size check box is selected. This field specifies the maximum number of messages that are retrieved at each polling interval.

The adapter returns to the event loop when the adapter finishes sending messages. Using this option helps process events in an efficient manner. For example, when polling a large number of rows, the adapter works best if a fixed number of rows is specified in this field.

If the Use Polling Batch Size check box is selected, the default value of the Polling Batch Size(Maximum Rows) field is 1000.

In the previous release, the Use Polling Batch Size check box is not selected by default. The default value of the Polling Batch Size (Maximum Rows) field is 0, which indicates that all new rows are fetched. If you use the default value, when the adapter receives a large number of messages from a database within a short period, in which the receiving speed exceeds the processing speed of the adapter, an OutOfMemory error might occur.

To resolve this issue, the default value is changed to 1000 in this release. Even within a short time, the adapter fetches only 1000 rows, which contributes to a reasonable performance of the adapter.

Note: When you use the Polling Batch Size(Maximum Rows) option, note the following conditions:
  • When you use the default polling interval, a value specified in the Polling Batch Size(Maximum Rows) field might affect the performance of the adapter. For example, if you set the value to 5, the adapter fetches 5 rows within 5 seconds. At this rate, the adapter can fetch 60 rows within 1 minute. If you set the value to 100, the adapter fetches 100 rows within 5 seconds. At this rate, the adapter can fetch 1200 rows within 1 minute. In general, the adapter can handle hundreds of or even thousands of rows within one second mainly depending on your machine performance. If the value of the Polling Batch Size(Maximum Rows) field is set excessively small, the performance of the adapter might deteriorate.
  • When you use the Polling Batch Size(Maximum Rows) and Enable Group Messaging options together in Publication Service, it is good practice to set the value of the Polling Batch Size(Maximum Rows) field to the value greater than or equal to the value of the Group Size field to improve the performance. If the value of the Polling Batch Size(Maximum Rows) field is set to be smaller than the value of the Group Size field, the group cannot be fully filled.
Batch Publish Status Updates Available only if the Use Polling Batch Size check box is selected. Select this check box to optimize the publishing performance by batching message status updates to the publishing table.

If an adapter configuration stops before a batch update is performed, the status column is not updated. As a result, duplicate messages might be published when the adapter configuration is restarted.

Note: Do not use this option when messages are published using a parameterized subject name.
Publisher Batch Confirm Size Specifies the number of messages that require their status to be updated in a single batch. The default value is 0.

This field is used only for the TIBCO Rendezvous Certified transport type. Do not use this option when messages are published using a parameterized subject name.

Entering a value in this field optimizes performance. However, if an adapter configuration stops before a batch update is performed, the status column is not updated. As a result, messages that were successfully published might still have a status of P (pending) in the publishing table when the adapter is restarted. In this case, the ledger file contains the correct status information. Smaller values in this field decrease this risk.

Publisher Batch Confirm Timeout Specifies the number of milliseconds to wait before updating the status column. After this interval, an update is performed even if the batch size value is not reached. The default value is 10,000 (10 seconds). A value of 0 means that no timeout interval is used.

This field is used only for the TIBCO Rendezvous Certified transport type. Do not use this option when messages are published using a parameterized subject name.

If an adapter configuration stops before a batch update is performed, the status column is not updated. As a result, messages that were successfully published might still have a status of P (pending) in the publishing table when the adapter is restarted. In this case, the ledger file contains the correct status information. Smaller timeout values decrease this risk.

Publication Service Option Information Panel
Storage Mode For each service, you must specify a storage mode:
  • Publish by Value: copies all specified columns in the source table to the publishing table.
  • Publish by Reference: copies only key column values to the publishing table. If no key column is defined in the database, a substitute non-key column must be defined to publish by reference.

For more information, see Selecting a Storage Mode.

Publishing Table Name of the database table that is used to store a copy of data to be published. The table name can be qualified with the schema.table_name format. The publishing table cannot contain any user-created columns in which the column name starts with ADB_. These characters are reserved for use by the adapter.

For better results use the publishing table name prefixed by P_. For example, if your source table is MY_ORDER, its publishing table is named P_MY_ORDER. A publishing table name must be less than 64 characters.

Referred Object Type the name of a view or a different database object in this field to select source data. This field is displayed when you select Publish by Reference from the Storage Mode list.

If you want to select source data from a list of tables in the current user schema, click Add. If you want to select source data from a different schema, click Add from.

Update Mode Select either of the following two methods to update tables:
  • Update: updates a row in the destination table only when the row exists.
  • Upsert: updates a row in the destination table if the row exists. If no such row exists, it performs an insert.
Enable Loop Detection Select this check box to enable loop detection and prevent an infinite loop from occurring when the publishing table and destination table are the same table. Loop detection is disabled for DB2 on z/OS.
Do Not Generate Triggers Select this check box to prevent the automatic generation of triggers. If this check box is selected, you have to generate triggers manually. It is good practice not to select this check box, but using this option helps manually manage the insertion of data into the publishing table.
Enable Group Messaging Select this check box to enable group messaging.
Group Size Available only if the Enable Group Messaging check box is selected. Specifies the number of rows to be published in a single message. You can use a module property to set a value for this field.
Enable Load Balancing Select this check box to enable load balancing so that multiple Publisher endpoints can poll and publish changes of the same source (publishing) table. Set a batch polling size before selecting this option.
Note: When you enable load balancing for Publication Service, the added table, automatically created publishing table, mutex name, and message subject name must be the same.
Mutex Name Available only if the Enable Load Balancing check box is selected. Specifies the name for the mutex table.
Number of Publication Service Threads These threads are allocated on demand. For example, if the Number of Publication Service Threads field is set to 1, a publication thread and a database connection are created automatically. With this number set, each Publication Service service holds a specified number of threads that connect to the database separately and process requests in parallel.

For related information, see "Multithreading in Publication Service" in Multithreading.

Publish Child Data This check box is selected by default. When this check box is selected, the parent row and all related child rows are published when a parent row is updated. Upon receipt of such a message, Subscription Service updates the parent row and then updates all the child rows with the data in a received message.

Any change to the child tables without a change in the parent table will not be processed. The adapter monitors only the parent table for publishing. The adapter updates the child rows by deleting all the related child rows, and then inserts child rows again based on the data in the received message.

For information on how to add related tables for Publication Service, see Adding Child Tables in Publication Service.

For information on how to add related tables for Subscription Service, see Adding Child Tables in Subscription Service.

Polling Commit for DB2 Select the Polling Commit for DB2 check box to enable Publication Service to perform a commit operation after selecting a query for DB2. This check box is displayed when you select a DB2 database as a vendor, including DB2 OS390, DB2 AS400, and DB2 UDB.