You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Björn Þór Jónsson <bt...@origo.is> on 2018/06/01 17:49:49 UTC

How to perform multiple Firebase queries in a Processor on a Camel route?

Hi,

how can multiple queries to Firebase be performed in an Apache Camel Processor, so it waits for all the callbacks and posts the result on the route, which then continues?

I've looked at the implementation in

https://github.com/camel-extra/camel-extra/blob/master/components/camel-firebase/src/main/java/org/apache/camel/component/firebase/FirebaseProducer.java

and tried to combine that with the setup described in

https://www.rubix.nl/blogs/playing-around-camel-asyncprocessor

where the Runnable process uses CompletableFuture's .allOf to combine the asynchronous results from the Firebase API's callbacks, but the route always finishes before callback results come in.


Thanks
/Björn