POJO プロデュースの場合、InOut がデフォルトであることが Camel ドキュメントに記載されています。ただし、ProducerTemplate の sendBody() を使用している場合、以下の例のように @InOnly も設定する必要はありますか。
public class MyBean {
@Produce(uri = "direct:hello")
private ProducerTemplate producerTemplate;
@InOnly
void someInOnlyMethod()
{
...
producerTemplate.sendBody("mystr");
...
}
}
同様に、次の例で、 direct:hello が @InOnly アノテーションなしで構成された上記の MyBean オブジェクトからメッセージを取得する場合、setExchangePattern 要素が必要ですか?
<route>
<from uri="direct:hello"/>
<setExchangePattern pattern="InOnly"/>
<to uri="mock:result"/>
</route>