Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 1 addition & 34 deletions components/camel-seda/src/main/docs/seda-component.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -220,40 +220,7 @@ async queue to be able to send a fire-and-forget message for further
processing in another thread, and return a constant reply in this thread
to the original caller.

[source,java]
----
@Test
public void testSendAsync() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedBodiesReceived("Hello World");

// START SNIPPET: e2
Object out = template.requestBody("direct:start", "Hello World");
assertEquals("OK", out);
// END SNIPPET: e2

assertMockEndpointsSatisfied();
}

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
// START SNIPPET: e1
public void configure() throws Exception {
from("direct:start")
// send it to the seda queue that is async
.to("seda:next")
// return a constant response
.transform(constant("OK"));

from("seda:next").to("mock:result");
}
// END SNIPPET: e1
};
}
----

Here we send a Hello World message and expects the reply to be OK.
We send a Hello World message and expects the reply to be OK.

[source,java]
----
Expand Down