krasserm / streamz

A combinator library for integrating Functional Streams for Scala (FS2), Akka Streams and Apache Camel
Apache License 2.0
282 stars 44 forks source link

timeout overrides configured greater delay value #56

Closed justwrote closed 6 years ago

justwrote commented 6 years ago

After some debugging I found out that specifying the timeout (https://github.com/krasserm/streamz/blob/master/streamz-camel-akka/src/main/scala/streamz/camel/akka/EndpointConsumer.scala#L52) will override the config delay (http://camel.apache.org/file2.html). This only happens if the delay value is greater than your 500ms timeout. Since we need a greater value it would be nice to have it removed at all and use the receive(uri) method (delay seems to have the same effect) or at least make it possible to change it. If you wish I'm happy to create a PR.

krasserm commented 6 years ago

Would appreciate a PR, thanks for offering. Maybe allowing applications to optionally place a config file (read by https://github.com/lightbend/config for example) would make most sense. Otherwise, several DSL methods would have to be extended in both, the camel-akka and camel-fs2, modules. Thoughts?