Code example for EventBus

Methods: post

0
 
    @Override 
    public void process(Exchange exchange) throws Exception {
        Object body = exchange.getIn().getBody();
        if (body != null) { 
            log.debug("Posting: {} to EventBus: {}", body, eventBus);
            eventBus.post(body);
        } else { 
            log.debug("Body is null, cannot post to EventBus"); 
        } 
    } 
 
}