Package org.apache.camel

Examples of org.apache.camel.Producer.createExchange()


        Producer producer = gatewayEndpoint.createProducer();
       
        LOG.info("Sending order");
       
        NewOrderSingle order = createNewOrderMessage();
        Exchange exchange = producer.createExchange(ExchangePattern.InOnly);
        exchange.getIn().setBody(order);
        producer.process(exchange);           

        if (!executionReportLatch.await(5, TimeUnit.SECONDS)) {
            throw new IllegalStateException("Did not receive execution reports");
View Full Code Here


        Email email = TestSupport.createEmailMessage("Dynamic Routing Example");
        email.getHeader().setString(DeliverToCompID.FIELD, "TRADER@2");
       
        LOG.info("Sending routed message");
       
        Exchange exchange = producer.createExchange(ExchangePattern.InOnly);
        exchange.getIn().setBody(email);
        producer.process(exchange);           

        if (!receivedMessageLatch.await(5, TimeUnit.SECONDS)) {
            throw new IllegalStateException("Message did not reach target");
View Full Code Here

        Endpoint producerEndpoint = component.createEndpoint(getEndpointUri(settingsFile.getName(), acceptorSessionID));
        Producer producer = producerEndpoint.createProducer();
       
        // FIX message to send
        Email email = new Email(new EmailThreadID("ID"), new EmailType(EmailType.NEW), new Subject("Test"));
        Exchange exchange = producer.createExchange(ExchangePattern.InOnly);
        exchange.getIn().setBody(email);
       
        producer.process(exchange);           

        // Produce with no session ID specified, session ID must be in message
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.