Long-running requests (requests which take many minutes or possibly hours) over jms are currently problematic:
- When the "requestTimeout" parameter on the producer is exceeded, the producer will give up waiting for a response and log an exception. To prevent this, the requestTimeout parameter could be set to a much higher value, but this doesn't seem reasonable, because the producer needs some way to know when the consumer is not really handling the request; the 20 second default for this parameter seems reasonable for this purpose. Instead, there should probably be some way for the consumer to communicate to the producer that the long-running request is still in progress. I would suggest that the jms consumer could automatically send a periodic heartbeat message to the producer to let it know that the request is still being handled.
- Long-running requests which occupy a pooled thread while waiting can exhaust the thread pool.
- If Camel is restarted, the exchange will be lost.