@Test public void testSyncSendFailure() throws InterruptedException { int id = (int) (System.currentTimeMillis() / 1000); producer.syncSend(id, "yu.nai.shuai"); logger.info("[testSyncSend][发送编号：[{}] 发送成功]", id); new CountDownLatch(1).await(); }
public void syncSend(Integer id, String routingKey) { Demo02Message message = new Demo02Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo02Message.EXCHANGE, routingKey, message); }
Demo02Producer { public void syncSend(Integer id, String routingKey) { Demo02Message message = new Demo02Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo02Message.EXCHANGE, routingKey, message); } }
Demo02Producer { public void syncSend(Integer id, String routingKey) { Demo02Message message = new Demo02Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo02Message.EXCHANGE, routingKey, message); }  }
Demo02Producer { public void syncSend(Integer id, String routingKey) { Demo02Message message = new Demo02Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo02Message.EXCHANGE, routingKey, message); }  void syncSend(Integer id, String routingKey); }
Demo02Producer { public void syncSend(Integer id, String routingKey) { Demo02Message message = new Demo02Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo02Message.EXCHANGE, routingKey, message); }  void syncSend(Integer id, String routingKey);  }