@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) { Demo05Message message = new Demo05Message(); message.setId(id); jmsTemplate.convertAndSend(Demo05Message.QUEUE, message); }
Demo05Producer { public void syncSend(Integer id) { Demo05Message message = new Demo05Message(); message.setId(id); jmsTemplate.convertAndSend(Demo05Message.QUEUE, message); } }
Demo05Producer { public void syncSend(Integer id) { Demo05Message message = new Demo05Message(); message.setId(id); jmsTemplate.convertAndSend(Demo05Message.QUEUE, message); }  }
Demo05Producer { public void syncSend(Integer id) { Demo05Message message = new Demo05Message(); message.setId(id); jmsTemplate.convertAndSend(Demo05Message.QUEUE, message); }  void syncSend(Integer id); }
Demo05Producer { public void syncSend(Integer id) { Demo05Message message = new Demo05Message(); message.setId(id); jmsTemplate.convertAndSend(Demo05Message.QUEUE, message); }  void syncSend(Integer id);  }