use of quickfix.SessionID in project camel by apache.
the class QuickfixjMessageJsonTransformer method transform.
public String transform(Message message) throws FieldNotFound, ConfigError {
SessionID sessionID = MessageUtils.getSessionID(message);
Session session = Session.lookupSession(sessionID);
DataDictionary dataDictionary = session.getDataDictionary();
if (dataDictionary == null) {
throw new IllegalStateException("No Data Dictionary. Exchange must reference an existing session");
}
return transform(message, dataDictionary);
}
use of quickfix.SessionID in project camel by apache.
the class FixMessageRouter method route.
public String route(Exchange exchange) {
Message message = exchange.getIn().getBody(Message.class);
if (message != null) {
SessionID destinationSession = getDestinationSessionID(message);
if (destinationSession != null) {
String destinationUri = String.format("%s?sessionID=%s", engineUri, destinationSession);
LOG.debug("Routing destination: {}", destinationUri);
return destinationUri;
}
}
return null;
}
Aggregations