Class ClusteredPostgresAggregationRepository

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.AggregationRepository, org.apache.camel.spi.OptimisticLockingAggregationRepository, org.apache.camel.spi.RecoverableAggregationRepository, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    public class ClusteredPostgresAggregationRepository
    extends ClusteredJdbcAggregationRepository
    PostgreSQL specific JdbcAggregationRepository that deals with SQL Violation Exceptions using special INSERT INTO .. ON CONFLICT DO NOTHING claues.
    • Constructor Detail

      • ClusteredPostgresAggregationRepository

        public ClusteredPostgresAggregationRepository()
        Creates an aggregation repository
      • ClusteredPostgresAggregationRepository

        public ClusteredPostgresAggregationRepository​(org.springframework.transaction.PlatformTransactionManager transactionManager,
                                                      String repositoryName,
                                                      DataSource dataSource)
        Creates an aggregation repository with the three mandatory parameters
    • Method Detail

      • insert

        protected void insert​(org.apache.camel.CamelContext camelContext,
                              String correlationId,
                              org.apache.camel.Exchange exchange,
                              String repositoryName,
                              Long version,
                              boolean completed)
                       throws Exception
        Inserts a new record into the given repository table
        Overrides:
        insert in class ClusteredJdbcAggregationRepository
        Parameters:
        camelContext - the current CamelContext
        correlationId - the correlation key
        exchange - the aggregated exchange
        repositoryName - The name of the table
        version - Version identifier
        Throws:
        Exception