Interface MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointProducerBuilder

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

    public static interface MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointProducerBuilder
    extends org.apache.camel.builder.EndpointProducerBuilder
    Advanced builder for endpoint producers for the MongoDB component.
    • Method Detail

      • lazyStartProducer

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointProducerBuilder lazyStartProducer​(boolean lazyStartProducer)
        Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option is a: <code>boolean</code> type. Default: false Group: producer (advanced)
        Parameters:
        lazyStartProducer - the value to set
        Returns:
        the dsl builder
      • lazyStartProducer

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointProducerBuilder lazyStartProducer​(String lazyStartProducer)
        Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option will be converted to a <code>boolean</code> type. Default: false Group: producer (advanced)
        Parameters:
        lazyStartProducer - the value to set
        Returns:
        the dsl builder
      • cursorRegenerationDelay

        default MongoDbEndpointBuilderFactory.AdvancedMongoDbEndpointProducerBuilder 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.AdvancedMongoDbEndpointProducerBuilder 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.AdvancedMongoDbEndpointProducerBuilder 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.AdvancedMongoDbEndpointProducerBuilder 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.AdvancedMongoDbEndpointProducerBuilder 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.AdvancedMongoDbEndpointProducerBuilder 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.AdvancedMongoDbEndpointProducerBuilder 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.AdvancedMongoDbEndpointProducerBuilder 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