Details
-
Enhancement
-
Resolution: Done
-
Major
-
fuse-7.1
-
None
Description
An example of a very common use case is the need to upload/download big files to backend systems.
Customers look for a solution that integrates with their backends for big data uploads/downloads.
Camel Undertow would need to be reviewed to be capable of handling such use cases.
There are 4 streaming scenarios to consider for the Camel Undertow component:
1) Consumer receives (request) large stream from client
2) Consumer sends (response) large stream to client
3) Producer sends (request) large stream to backend
4) Producer receives (response) large stream from backend
Currently the component is unable to perform the above operations.
In some scenarios it appears Camel Undertow is trying to read the entire stream causing out-of-memory errors.
In other scenarios it seems it simply can't deal with Java Input/Output stream objects.
Find attached a SpringBoot based project able to reproduce the above scenarios.
It includes 7 JUnits to test streaming capabilities from which the following test cases are failing:
1) testCamelUndertowConsumerStreamUpload
2) testCamelUndertowConsumerStreamDownload
3) testCamelUndertowProducerStreamUpload
4) testCamelUndertowProducerStreamDownload
The other JUnits are included to help us understand the mechanics of streaming in Camel.
The project relies on SpringBoot's embedded server to showcase a working solution without Camel's Undertow component.
To reproduce the problems, execute:
> mvn clean test
or one at a time:
> mvn clean test -Dtest=StreamTest#testCamelUndertowProducerStreamUpload