camel-mongodb-gridfs-kafka-connector source configuration

Connector Description: Interact with MongoDB GridFS.

When using camel-mongodb-gridfs-kafka-connector as source make sure to use the following Maven dependency to have support for the connector:

<dependency>
  <groupId>org.apache.camel.kafkaconnector</groupId>
  <artifactId>camel-mongodb-gridfs-kafka-connector</artifactId>
  <version>x.x.x</version>
  <!-- use the same version as your Camel Kafka connector version -->
</dependency>

To use this source connector in Kafka connect you’ll need to set the following connector.class

connector.class=org.apache.camel.kafkaconnector.mongodbgridfs.CamelMongodbgridfsSourceConnector

The camel-mongodb-gridfs source connector supports 17 options, which are listed below.

Name Description Default Priority

camel.source.path.connectionBean

Required Name of com.mongodb.client.MongoClient to use.

HIGH

camel.source.endpoint.bucket

Sets the name of the GridFS bucket within the database. Default is fs.

"fs"

MEDIUM

camel.source.endpoint.database

Required Sets the name of the MongoDB database to target.

HIGH

camel.source.endpoint.readPreference

Sets a MongoDB ReadPreference on the Mongo connection. Read preferences set directly on the connection will be overridden by this setting. The com.mongodb.ReadPreference#valueOf(String) utility method is used to resolve the passed readPreference value. Some examples for the possible values are nearest, primary or secondary etc.

MEDIUM

camel.source.endpoint.writeConcern

Set the WriteConcern for write operations on MongoDB using the standard ones. Resolved from the fields of the WriteConcern class by calling the WriteConcern#valueOf(String) method. One of: [ACKNOWLEDGED] [W1] [W2] [W3] [UNACKNOWLEDGED] [JOURNALED] [MAJORITY].

Enum values:

  • ACKNOWLEDGED

  • W1

  • W2

  • W3

  • UNACKNOWLEDGED

  • JOURNALED

  • MAJORITY

MEDIUM

camel.source.endpoint.bridgeErrorHandler

Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.

false

MEDIUM

camel.source.endpoint.delay

Sets the delay between polls within the Consumer. Default is 500ms.

500L

MEDIUM

camel.source.endpoint.fileAttributeName

If the QueryType uses a FileAttribute, this sets the name of the attribute that is used. Default is camel-processed.

"camel-processed"

MEDIUM

camel.source.endpoint.initialDelay

Sets the initialDelay before the consumer will start polling. Default is 1000ms.

1000L

MEDIUM

camel.source.endpoint.persistentTSCollection

If the QueryType uses a persistent timestamp, this sets the name of the collection within the DB to store the timestamp.

"camel-timestamps"

MEDIUM

camel.source.endpoint.persistentTSObject

If the QueryType uses a persistent timestamp, this is the ID of the object in the collection to store the timestamp.

"camel-timestamp"

MEDIUM

camel.source.endpoint.query

Additional query parameters (in JSON) that are used to configure the query used for finding files in the GridFsConsumer.

MEDIUM

camel.source.endpoint.queryStrategy

Sets the QueryStrategy that is used for polling for new files. Default is Timestamp One of: [TimeStamp] [PersistentTimestamp] [FileAttribute] [TimeStampAndFileAttribute] [PersistentTimestampAndFileAttribute].

Enum values:

  • TimeStamp

  • PersistentTimestamp

  • FileAttribute

  • TimeStampAndFileAttribute

  • PersistentTimestampAndFileAttribute

"TimeStamp"

MEDIUM

camel.source.endpoint.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.

MEDIUM

camel.source.endpoint.exchangePattern

Sets the exchange pattern when the consumer creates an exchange. One of: [InOnly] [InOut] [InOptionalOut].

Enum values:

  • InOnly

  • InOut

  • InOptionalOut

MEDIUM

camel.component.mongodb-gridfs.bridgeErrorHandler

Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.

false

MEDIUM

camel.component.mongodb-gridfs.autowiredEnabled

Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.

true

MEDIUM

The camel-mongodb-gridfs source connector has no converters out of the box.

The camel-mongodb-gridfs source connector has no transforms out of the box.

The camel-mongodb-gridfs source connector has no aggregation strategies out of the box.