Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mongodb examples #823

Closed
oscerd opened this issue Jan 4, 2021 · 2 comments
Closed

Add Mongodb examples #823

oscerd opened this issue Jan 4, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@oscerd
Copy link
Contributor

oscerd commented Jan 4, 2021

To camel-kafka-connector-examples repo

@oscerd oscerd self-assigned this Jan 4, 2021
@orpiske
Copy link
Contributor

orpiske commented Jan 4, 2021

Sample configuration for the MongoDB sink:

connector.class=org.apache.camel.kafkaconnector.mongodb.CamelMongodbSinkConnector
camel.sink.endpoint.operation=insert
camel.sink.endpoint.collection=testRecords
tasks.max=1
topics=org.apache.camel.kafkaconnector.mongodb.sink.CamelSinkMongoDBITCase
name=CamelMongoDBSinkConnector
value.converter=org.apache.kafka.connect.storage.StringConverter
camel.sink.path.connectionBean=mongo
camel.beans.mongo=#class:com.mongodb.client.MongoClients#create('mongodb://localhost:32772')
camel.sink.endpoint.database=testDB
key.converter=org.apache.kafka.connect.storage.StringConverter

An important bit for the mongoDB sink is to configure the camel.beans.mongo property correctly. In this case, it is setting the bean to be created by calling the method create passing the URL of the mongodb instance (mongodb://localhost:32772). This should be configured accordingly to your setup.

@oscerd oscerd added this to the 0.8.0 milestone Jan 13, 2021
@oscerd
Copy link
Contributor Author

oscerd commented Jan 15, 2021

@oscerd oscerd closed this as completed Jan 15, 2021
@oscerd oscerd added the 0.8.0 label Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants