public void onMessage(final Message message) { if(message instanceof TextMessage) { try { TextMessage m = (TextMessage) message; LOG.info(m.getText()); TaskResultMessage resultMessage = JSON.parseObject(m.getText(), TaskResultMessage.class); String pathStr = resultMessage.getDataPath(); String fileName = new Path(pathStr).getName(); int index = fileName.indexOf("."); resultMessage.setSectionTypeId(fileName.substring(0, index)); booster.push(resultMessage.getSectionTypeId(), resultMessage); } catch (Exception e) { LOG.error("处理文件异常", e); } } }