Interface MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointConsumerBuilder, org.apache.camel.EndpointConsumerResolver
    All Known Subinterfaces:
    MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointBuilder
    Enclosing interface:
    MongoDbEndpointBuilderFactory

    public static interface MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder
    extends org.apache.camel.builder.EndpointConsumerBuilder
    Advanced builder for endpoint consumers for the MongoDB component.
    • Method Detail

      • exceptionHandler

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder exceptionHandler​(org.apache.camel.spi.ExceptionHandler exceptionHandler)
        To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option is a: <code>org.apache.camel.spi.ExceptionHandler</code> type. Group: consumer (advanced)
        Parameters:
        exceptionHandler - the value to set
        Returns:
        the dsl builder
      • exceptionHandler

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder exceptionHandler​(String exceptionHandler)
        To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option will be converted to a <code>org.apache.camel.spi.ExceptionHandler</code> type. Group: consumer (advanced)
        Parameters:
        exceptionHandler - the value to set
        Returns:
        the dsl builder
      • exchangePattern

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder exchangePattern​(org.apache.camel.ExchangePattern exchangePattern)
        Sets the exchange pattern when the consumer creates an exchange. The option is a: <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced)
        Parameters:
        exchangePattern - the value to set
        Returns:
        the dsl builder
      • exchangePattern

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder exchangePattern​(String exchangePattern)
        Sets the exchange pattern when the consumer creates an exchange. The option will be converted to a <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced)
        Parameters:
        exchangePattern - the value to set
        Returns:
        the dsl builder
      • cursorRegenerationDelay

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder cursorRegenerationDelay​(long cursorRegenerationDelay)
        MongoDB tailable cursors will block until new data arrives. If no new data is inserted, after some time the cursor will be automatically freed and closed by the MongoDB server. The client is expected to regenerate the cursor if needed. This value specifies the time to wait before attempting to fetch a new cursor, and if the attempt fails, how long before the next attempt is made. Default value is 1000ms. The option is a: <code>long</code> type. Default: 1000 Group: advanced
        Parameters:
        cursorRegenerationDelay - the value to set
        Returns:
        the dsl builder
      • cursorRegenerationDelay

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder cursorRegenerationDelay​(String cursorRegenerationDelay)
        MongoDB tailable cursors will block until new data arrives. If no new data is inserted, after some time the cursor will be automatically freed and closed by the MongoDB server. The client is expected to regenerate the cursor if needed. This value specifies the time to wait before attempting to fetch a new cursor, and if the attempt fails, how long before the next attempt is made. Default value is 1000ms. The option will be converted to a <code>long</code> type. Default: 1000 Group: advanced
        Parameters:
        cursorRegenerationDelay - the value to set
        Returns:
        the dsl builder
      • dynamicity

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder dynamicity​(boolean dynamicity)
        Sets whether this endpoint will attempt to dynamically resolve the target database and collection from the incoming Exchange properties. Can be used to override at runtime the database and collection specified on the otherwise static endpoint URI. It is disabled by default to boost performance. Enabling it will take a minimal performance hit. The option is a: <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        dynamicity - the value to set
        Returns:
        the dsl builder
      • dynamicity

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder dynamicity​(String dynamicity)
        Sets whether this endpoint will attempt to dynamically resolve the target database and collection from the incoming Exchange properties. Can be used to override at runtime the database and collection specified on the otherwise static endpoint URI. It is disabled by default to boost performance. Enabling it will take a minimal performance hit. The option will be converted to a <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        dynamicity - the value to set
        Returns:
        the dsl builder
      • readPreference

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder readPreference​(String readPreference)
        Configure how MongoDB clients route read operations to the members of a replica set. Possible values are PRIMARY, PRIMARY_PREFERRED, SECONDARY, SECONDARY_PREFERRED or NEAREST. The option is a: <code>java.lang.String</code> type. Default: PRIMARY Group: advanced
        Parameters:
        readPreference - the value to set
        Returns:
        the dsl builder
      • writeConcern

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder writeConcern​(String writeConcern)
        Configure the connection bean with the level of acknowledgment requested from MongoDB for write operations to a standalone mongod, replicaset or cluster. Possible values are ACKNOWLEDGED, W1, W2, W3, UNACKNOWLEDGED, JOURNALED or MAJORITY. The option is a: <code>java.lang.String</code> type. Default: ACKNOWLEDGED Group: advanced
        Parameters:
        writeConcern - the value to set
        Returns:
        the dsl builder
      • writeResultAsHeader

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder writeResultAsHeader​(boolean writeResultAsHeader)
        In write operations, it determines whether instead of returning WriteResult as the body of the OUT message, we transfer the IN message to the OUT and attach the WriteResult as a header. The option is a: <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        writeResultAsHeader - the value to set
        Returns:
        the dsl builder
      • writeResultAsHeader

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointConsumerBuilder writeResultAsHeader​(String writeResultAsHeader)
        In write operations, it determines whether instead of returning WriteResult as the body of the OUT message, we transfer the IN message to the OUT and attach the WriteResult as a header. The option will be converted to a <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        writeResultAsHeader - the value to set
        Returns:
        the dsl builder