THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"> <!-- reference the shared http server --> <reference id="sharedNettyHttpServer" interface="org.apache.camel.component.netty.http.NettySharedHttpServer"/> <!-- Camel application which uses the netty-http component and the shared Netty HTTP server --> <camelContext xmlns="http://camel.apache.org/schema/blueprint"> <route id="http-route-one"> <from uri="netty-http:http://localhost/one?matchOnUriPrefix=true&nettySharedHttpServer=#sharedNettyHttpServer"/> <transform> <simple>Response from Camel one using thread: ${threadName}</simple> </transform> </route> </camelContext> </blueprint> |
Note | ||
---|---|---|
| ||
When using the
This is because the shared Netty HTTP server needs to know exactly which Camel application that should route the incoming message. And therefore the context-path must be unique among all the Camel routes. |
Running the example
This example runs in Apache Karaf / ServiceMix container.
...
Code Block |
---|
http://localhost:8888/one http://localhost:8888/two |