I'm new to Camel. I really like it so far. However, there's a task I'm struggling with. The approaches I'm drifting toward are overly complicated, and I feel like there must be an easier, more Camel-intended way of doing this.
I'm receiving json documents from an Artemis queue. I'm using a content based router, and for the type==partial, I need to replace a document in MongoDB with it. The content based router was easy enough to figure out. But I'm stuck figuring out how to remove the duccent document(s) in MongoDB before inserting the new one. I've experimented with a few approaches. I'd try to describe them, but I'm betting this is an easy question to answer... Here is my route from("jms:topic:orderbook.raw.feed") .choice() .when().jsonpath("$.[?(@.type=='partial')]") // Need to delete the current document(s) with {currency:"USD"} .to("mongodb:mongo?database=k2_dev&collection=orderbooks&operation=save"); Thanks for any advice.