// For all received messages, print the JSON-formatted message to stdout
from("quickfix:examples/inprocess.cfg").
filter(PredicateBuilder.or(
header(QuickfixjEndpoint.EVENT_CATEGORY_KEY).isEqualTo(QuickfixjEventCategory.AdminMessageReceived),
header(QuickfixjEndpoint.EVENT_CATEGORY_KEY).isEqualTo(QuickfixjEventCategory.AppMessageReceived))).
bean(new QuickfixjMessageJsonPrinter());
// If the market session receives an email then release the latch
from("quickfix:examples/inprocess.cfg?sessionID=FIX.4.2:MARKET->TRADER").
filter(header(QuickfixjEndpoint.MESSAGE_TYPE_KEY).isEqualTo(MsgType.EMAIL)).
bean(new CountDownLatchDecrementer("message", receivedMessageLatch));