The most straightforward use of a mediation is for tracing, monitoring or logging messages that pass through a destination or topics spaces. This type of mediation does not modify the message; it simply extracts information from the message, and saves or displays the information elsewhere.
public boolean(MessageContext context) { SIMessageContext msgCtx = (SIMessageContext)context; SIMediationSession session = msgCtx.getSession(); SIMessage msg = msgCtx.getMessage(); String msgId = msg.getApiMessageId(); String corrId = msg.getCorrelationId(); String dest = session.getDestinationName(); System.out.println(msgId+" (correlation id="+corrid) is passing through "+dest+"."); return true; }