Search in sources :

Example 1 with HeaderDto

use of org.apache.camel.processor.aggregate.jdbc.util.HeaderDto in project camel by apache.

the class JdbcAggregateSerializedHeadersTest method testLoadTestJdbcAggregate.

@Test
public void testLoadTestJdbcAggregate() throws Exception {
    MockEndpoint mock = getMockEndpoint("mock:result");
    mock.expectedMinimumMessageCount(1);
    mock.setResultWaitTime(50 * 1000);
    LOG.info("Staring to send " + SIZE + " messages.");
    for (int i = 0; i < SIZE; i++) {
        final int value = 1;
        HeaderDto headerDto = new HeaderDto("org", "company", 1);
        LOG.debug("Sending {} with id {}", value, headerDto);
        template.sendBodyAndHeader("seda:start?size=" + SIZE, value, "id", headerDto);
    }
    LOG.info("Sending all " + SIZE + " message done. Now waiting for aggregation to complete.");
    assertMockEndpointsSatisfied();
}
Also used : MockEndpoint(org.apache.camel.component.mock.MockEndpoint) HeaderDto(org.apache.camel.processor.aggregate.jdbc.util.HeaderDto) MockEndpoint(org.apache.camel.component.mock.MockEndpoint) Test(org.junit.Test)

Aggregations

MockEndpoint (org.apache.camel.component.mock.MockEndpoint)1 HeaderDto (org.apache.camel.processor.aggregate.jdbc.util.HeaderDto)1 Test (org.junit.Test)1