| | |
| | | rabbitTemplate.setConfirmCallback(this); |
| | | } |
| | | |
| | | /** |
| | | * 发送盘口消息 |
| | | * @param content |
| | | * @return void |
| | | */ |
| | | public void sendPlateMsg(String content) { |
| | | CorrelationData correlationData = new CorrelationData(IdUtil.simpleUUID()); |
| | | rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_B, RabbitMqConfig.ROUTINGKEY_TRADE_PLATE, content, correlationData); |
| | |
| | | } |
| | | |
| | | |
| | | public void sendCompleteMsg(String content) { |
| | | CorrelationData correlationData = new CorrelationData(IdUtil.simpleUUID()); |
| | | rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_ROC_ORDER_COMPLETE, RabbitMqConfig.ROUTING_KEY_ROC_ORDER_COMPLETE, content, correlationData); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void confirm(CorrelationData correlationData, boolean ack, String cause) { |
| | | log.info("#----->{}#", correlationData); |
| | | //log.info("#----->{}#", correlationData); |
| | | if (ack) { |
| | | log.info("success"); |
| | | //log.info("success"); |
| | | } else { |
| | | log.info("--->{}", cause); |
| | | } |