public class GenericDeadLetterTableFactory extends Object implements DeadLetterTableFactory
DeadLetterTableFactory implementation compatible with most databases.| Constructor and Description |
|---|
GenericDeadLetterTableFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createTableSql(DeadLetterSchema schema)
Constructs the SQL to create a dead-letter table, using the given
schema to deduce the table and column
names. |
Statement |
createTableStatement(Connection connection,
DeadLetterSchema schema)
Creates a
Statement to use for construction of a
DeadLetter entry table and its indices. |
protected String |
processingGroupIndexSql(DeadLetterSchema schema)
Constructs the SQL to create an index of the
processing group ,
using the given schema to deduce the table and column names. |
protected String |
sequenceIdentifierIndexSql(DeadLetterSchema schema)
Constructs the SQL to create an index for the
processing group
and sequence indentifier combination, using the given
schema to deduce the table and column names. |
protected String |
serializedDataType()
Returns the SQL to describe the type for serialized data columns.
|
protected String |
timestampType()
Returns the SQL to describe the type for timestamp columns.
|
public Statement createTableStatement(Connection connection, DeadLetterSchema schema) throws SQLException
DeadLetterTableFactoryStatement to use for construction of a
DeadLetter entry table and its indices.
The returned Statement typically contains several SQL statements and hence the invoker is inclined to
execute the Statement as a batch by invoking Statement.executeBatch(). Furthermore, it is
expected that this statement at least constructs the required uniqueness constraints.
createTableStatement in interface DeadLetterTableFactoryconnection - The connection to create the Statement with.schema - The schema defining the table and column names.statement to create the table and its indices with, ready to be
executed.SQLException - when an exception occurs while creating the Statement.protected String createTableSql(DeadLetterSchema schema)
schema to deduce the table and column
names.schema - The schema defining the table and column names.protected String processingGroupIndexSql(DeadLetterSchema schema)
processing group ,
using the given schema to deduce the table and column names.schema - The schema defining the table and column names.processing group
for the dead-letter table.protected String sequenceIdentifierIndexSql(DeadLetterSchema schema)
processing group
and sequence indentifier combination, using the given
schema to deduce the table and column names.schema - The schema defining the table and column names.processing group and
{@link DeadLetterSchema#sequenceIdentifierColumn() combination for the dead-letter table.protected String serializedDataType()
Used for the DeadLetterSchema.payloadColumn(), DeadLetterSchema.metaDataColumn(),
DeadLetterSchema.tokenColumn(), and the DeadLetterSchema.diagnosticsColumn(). Defaults to
BLOB.
protected String timestampType()
Used for the DeadLetterSchema.enqueuedAtColumn(), DeadLetterSchema.lastTouchedColumn(),
DeadLetterSchema.processingGroupColumn(), and the DeadLetterSchema.timestampColumn(). Defaults to
VARCHAR(255).
Copyright © 2010–2025. All rights reserved.