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

Enhance mongodb sink kamelet #401

Merged
merged 1 commit into from
Jul 1, 2021
Merged

Conversation

claudio4j
Copy link
Contributor

Adding more parameters and expected headers to control document
filtering, sorting, limits, skip, etc

@claudio4j
Copy link
Contributor Author

/cc @oscerd

@oscerd
Copy link
Contributor

oscerd commented Jun 25, 2021

To me a kamelet should be a pre-baked action. So it should be tailored just for one operation. If we need to add more operations they should be different kamelets. So i would focus on options related to insert operation (headers and endpoint params) and leave the operation as insert and static. If you think about the kafka connectivity for example, if you use the sink kamelet you'll go for inserting Kafka records in mongodb

@claudio4j
Copy link
Contributor Author

It's ok for me to add another mongodb-op-sink kamelet so users can specify which operation to run, for example a findAll operation with filter/sort/limit parameters, sounds appropriate for users who want to retrieve data from mongodb.

@oscerd
Copy link
Contributor

oscerd commented Jun 25, 2021

If they need to retrieve something from mongodb they should use a source kamelet

@oscerd
Copy link
Contributor

oscerd commented Jun 28, 2021

I think you should create specialized sink kamelet for more operations on the sink side, but I wouldn't add all the headers in one place. For the general sink, I would just add the writeConcern and createCollection properties and leave it as is. The aim of kamelets is to hide the Camel internals to the users.

@claudio4j
Copy link
Contributor Author

@oscerd In addition to those you mentioned I think db-upsert is useful too.

@oscerd oscerd merged commit 35e81bf into apache:main Jul 1, 2021
@claudio4j claudio4j deleted the enhance_mongo_sink branch April 4, 2022 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants