
Apache Camel: Integration Nirvana
![]() | Composed Message Processor | How can you maintain the overall message flow when processing a message consisting of multiple elements, each of which may require different processing? |
![]() | Claim Check | How can we reduce the data volume of message sent across the system without sacrificing information content? |
![]() | Detour | How can you route a message through intermediate steps to perform validation, testing or debugging functions? |
Scatter-Gather | How do you maintain the overall message flow when a message needs to be sent to multiple recipients, each of which may send a reply? |
public class BeanThatTalksCamel {
@Produce(uri="activemq:myQueue")
ProducerTemplate producer;
@Consume(uri = "file:a/path")
public void onFileSendToQueue(String body) {
producer.sendBody(body);
}
}
public class RecipientListBean {
@Consume(uri = "activemq:myQueue")
@RecipientList
public List route(String body) {
// return list of recipients based on message body
}
}
#6 Print Test Failures to Standard Output
Tip: Enable -Dsurefire.useFile=false. This is a favorite of mine since this causes surefire to print test failures to standard out, where it will get included in the build failure log and email. This saves you from having to dig back onto the machine to find the surefire report just to see a simple stack trace. (to enable globally in settings.xml:in an active profile) true