Class GenericDeadLetterTableFactory
java.lang.Object
org.axonframework.messaging.eventhandling.deadletter.jdbc.GenericDeadLetterTableFactory
- All Implemented Interfaces:
DeadLetterTableFactory
A
DeadLetterTableFactory implementation compatible with most databases.- Since:
- 4.8.0
- Author:
- Steven van Beelen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateTableSql(DeadLetterSchema schema) Constructs the SQL to create a dead-letter table, using the givenschemato deduce the table and column names.createTableStatement(Connection connection, DeadLetterSchema schema) Creates aStatementto use for construction of aDeadLetterentry table and its indices.protected StringConstructs the SQL to create an index of theprocessing group, using the givenschemato deduce the table and column names.protected StringConstructs the SQL to create an index for theprocessing groupandsequence indentifiercombination, using the givenschemato deduce the table and column names.protected StringReturns the SQL to describe the type for serialized data columns.protected StringReturns the SQL to describe the type for timestamp columns.
-
Constructor Details
-
GenericDeadLetterTableFactory
public GenericDeadLetterTableFactory()
-
-
Method Details
-
createTableStatement
public Statement createTableStatement(Connection connection, DeadLetterSchema schema) throws SQLException Description copied from interface:DeadLetterTableFactoryCreates aStatementto use for construction of aDeadLetterentry table and its indices.The returned
Statementtypically contains several SQL statements and hence the invoker is inclined to execute theStatementas a batch by invokingStatement.executeBatch(). Furthermore, it is expected that this statement at least constructs the required uniqueness constraints.- Specified by:
createTableStatementin interfaceDeadLetterTableFactory- Parameters:
connection- The connection to create theStatementwith.schema- The schema defining the table and column names.- Returns:
- A
statementto create the table and its indices with, ready to beexecuted. - Throws:
SQLException- when an exception occurs while creating theStatement.
-
createTableSql
Constructs the SQL to create a dead-letter table, using the givenschemato deduce the table and column names.- Parameters:
schema- The schema defining the table and column names.- Returns:
- The SQL to construct the dead-letter table.
-
processingGroupIndexSql
Constructs the SQL to create an index of theprocessing group, using the givenschemato deduce the table and column names.- Parameters:
schema- The schema defining the table and column names.- Returns:
- The SQL to construct the index for the
processing groupfor the dead-letter table.
-
sequenceIdentifierIndexSql
Constructs the SQL to create an index for theprocessing groupandsequence indentifiercombination, using the givenschemato deduce the table and column names.- Parameters:
schema- The schema defining the table and column names.- Returns:
- The SQL to construct the index for
processing groupandinvalid input: 'combination for the dead-letter table.'
-
serializedDataType
Returns the SQL to describe the type for serialized data columns.Used for the
DeadLetterSchema.payloadColumn(),DeadLetterSchema.metadataColumn(),DeadLetterSchema.tokenColumn(), and theDeadLetterSchema.diagnosticsColumn(). Defaults toBLOB.- Returns:
- The SQL to describe the type for serialized data columns.
-
timestampType
Returns the SQL to describe the type for timestamp columns.Used for the
DeadLetterSchema.enqueuedAtColumn(),DeadLetterSchema.lastTouchedColumn(),DeadLetterSchema.processingGroupColumn(), and theDeadLetterSchema.timestampColumn(). Defaults toVARCHAR(255).- Returns:
- The SQL to describe the type for timestamp columns.
-