Interface ReplicationConnection.Builder

    • Method Detail

      • withPublicationAutocreateMode

        ReplicationConnection.Builder withPublicationAutocreateMode​(PostgresConnectorConfig.AutoCreateMode publicationAutocreateMode)
        Sets the publication autocreate mode for the PG logical publication
        Parameters:
        publicationAutocreateMode - the name of the publication, may not be null.
        Returns:
        this instance
      • dropSlotOnClose

        ReplicationConnection.Builder dropSlotOnClose​(boolean dropSlotOnClose)
        Whether or not to drop the replication slot once the replication connection closes
        Parameters:
        dropSlotOnClose - true if the slot should be dropped once the connection is closed, false otherwise
        Returns:
        this instance
        See Also:
        DEFAULT_DROP_SLOT_ON_CLOSE
      • statusUpdateInterval

        ReplicationConnection.Builder statusUpdateInterval​(Duration statusUpdateInterval)
        The number of milli-seconds the replication connection should periodically send updates to the server.
        Parameters:
        statusUpdateInterval - a duration; null or non-positive value causes Postgres' default to be applied
        Returns:
        this instance
      • streamParams

        ReplicationConnection.Builder streamParams​(String streamParams)
        Optional parameters to pass to the logical decoder when the stream starts.
        Parameters:
        streamParams - String of key and value pairs declared with "=". Pairs are separated by ";". Example: "add-tables=public.table,public.table2;include-lsn=true"
        Returns:
        this instance
        See Also:
        #STREAM_PARAMS
      • doSnapshot

        ReplicationConnection.Builder doSnapshot​(boolean doSnapshot)
        Whether or not the snapshot is executed
        Parameters:
        doSnapshot - true if a snapshot is going to be executed, false if otherwise
        Returns:
        this instance