Class ClusteredPostgresAggregationRepository

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
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 Details

    • 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 Details

    • 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