The SQL Persistence provides autonomy between endpoints by using separate tables for every endpoint based on the endpoint name. However, due to Oracle's 30-character limit on table names and index names, the SQL Persistence must make some compromises.
For storing subscriptions, timeouts, and outbox data, SQL Persistence will reserve 24 characters for the endpoint name, leaving 3 characters for the persistence type, and additional 3 characters for an index type. Names are then constructed as
The following table shows table names created for an endpoint named
|Persistence type||Suffix||Table Name||Indexes|
If an endpoint name is longer than 24 characters, an exception will be thrown, and a substitute table prefix must be specified in the endpoint configuration:
var persistence = endpointConfiguration.UsePersistence<SqlPersistence>(); persistence.TablePrefix("ThePrefix");
Tables generated for sagas reserve 27 characters for the saga name, leaving 3 characters for the
_PK suffix for the table's primary key.
In order to accommodate as many characters for the saga name as possible, the table prefix is omitted from the saga table name.
|Saga Class Name||Table Name||Primary Key|
A 3-character suffix is not enough to uniquely identify multiple correlation properties in a deterministic way, so unfortunately index names for sagas cannot be named after the owner table in the same way as for other persistence types.
Index names for correlation properties are constructed using the prefix
SAGAIDX_ plus a deterministic hash of the saga name and correlation property name. The owning table for a particular index can be discovered by querying the database:
select TABLE_NAME from ALL_INDEXES where INDEX_NAME = 'SAGAIDX_525D1D4DC0C3DCD96947E1';
If a saga name is longer than 27 characters, an exception will be thrown, and a substitute table name must be specified.
Because Oracle 11g does not support any JSON query capability, custom saga finders that locate saga data by querying into the JSON payload of the saga are not supported by SQL Persistence when using Oracle.