The servlet: component provides HTTP based endpoints for consuming HTTP requests that arrive at a HTTP endpoint and this endpoint is bound to a published Servlet.
Maven users will need to add the following dependency to their
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-servlet</artifactId> <!-- use the same version as your Camel core version --> <version>x.x.x</version> </dependency>
Servlet is stream based, which means the input it receives is submitted to Camel as a stream. That means you will only be able to read the content of the stream once. If you find a situation where the message body appears to be empty or you need to access the data multiple times (eg: doing multicasting, or redelivery error handling) you should use Stream Caching or convert the message body to a String which is safe to be read multiple times.