ByteArrayOutputStream stackTrace = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(stackTrace);
reason.printStackTrace(ps);
ps.flush();
Message msg = new Message();
msg.setParentMessage(parent.getGuid());
msg.setPublisherGuid(responderId);
msg.setResultSetId(parent.getResultSetId());
msg.setStepId(parent.getStepId());
msg.setTopicGuid(TOPIC_MSG_PROCESSING_FAILURE);
msg.getContent().put("Stack trace", new String(stackTrace.toByteArray()));
messageDao.publish(msg);
}