public LoggingEvent call() throws Exception { String id = String.format("%s:%s", appenderId, System.currentTimeMillis()); String routingKey = String.format(queueNameFormatString, event.getLevel().toString(), event.getLoggerName()); AMQP.BasicProperties props = new AMQP.BasicProperties(); props.setCorrelationId(id); props.setType(event.getLevel().toString()); props.setTimestamp(Calendar.getInstance().getTime()); getChannel().basicPublish(exchange, routingKey, props, message.toString().getBytes()); return event; } }