...
Wiki Markup |
---|
{snippet:id=e1|lang=java|url=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/AnotherCamelProxyTest.java} |
In Camel 2.3 you can define that proxied methods which has void
as return type, can be treated as Event Message messaging style (aka InOnly). This is done by setting the attribute voidAsInOnly=true
in the <proxy/> tag. If you let it be the default value, which is InOut
then a void method will still wait for the message to be completely routed. This is not always what you want and hence you can use this option to turn it onto a fire and forget style. BTW: You can also add the @InOnly
annotation to the method on the interface to tell Camel that this method is InOnly.
Proxy from Java
You can also create a proxy from regular Java using a ProxyHelper as shown below:
...