@Test public void testSyncSend() throws InterruptedException { for (int i = 0; i < 2; i++) { for (int id = 0; id < 4; id++) { producer.syncSend(id); } } new CountDownLatch(1).await(); }
public void syncSend(Integer id) { Demo10Message message = new Demo10Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo10Message.EXCHANGE, this.getRoutingKey(id), message); }
Demo10Producer { public void syncSend(Integer id) { Demo10Message message = new Demo10Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo10Message.EXCHANGE, this.getRoutingKey(id), message); } }
Demo10Producer { public void syncSend(Integer id) { Demo10Message message = new Demo10Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo10Message.EXCHANGE, this.getRoutingKey(id), message); }  }
Demo10Producer { public void syncSend(Integer id) { Demo10Message message = new Demo10Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo10Message.EXCHANGE, this.getRoutingKey(id), message); }  void syncSend(Integer id); }
Demo10Producer { public void syncSend(Integer id) { Demo10Message message = new Demo10Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo10Message.EXCHANGE, this.getRoutingKey(id), message); }  void syncSend(Integer id);  }