public void configure() throws Exception {
from("direct:start")
// send it to the disruptor that is async
.to("disruptor:next")
// return a constant response
.transform(constant("OK"));
from("disruptor:next").to("mock:result");
}
public void configure() throws Exception {
from("direct:start")
// send it to the disruptor that is async
.to("disruptor:next")
// return a constant response
.transform(constant("OK"));
from("disruptor:next").to("mock:result");
}
Copy to ClipboardCopied!Toggle word wrapToggle overflow
ここでは Hello World のメッセージを送信し、応答が OK であることを想定します。
Object out = template.requestBody("direct:start", "Hello World");
assertEquals("OK", out);
Object out = template.requestBody("direct:start", "Hello World");
assertEquals("OK", out);
Copy to ClipboardCopied!Toggle word wrapToggle overflow