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