@Test public void testSyncSend() throws InterruptedException { for (int i = 0; i < 3; i++) { int id = (int) (System.currentTimeMillis() / 1000); producer.syncSend(id); logger.info("[testSyncSend][发送编号：[{}] 发送成功]", id); } new CountDownLatch(1).await(); }
public void syncSend(Integer id) { ClusteringMessage message = new ClusteringMessage(); message.setId(id); jmsTemplate.convertAndSend(ClusteringMessage.QUEUE, message); }
ClusteringProducer { public void syncSend(Integer id) { ClusteringMessage message = new ClusteringMessage(); message.setId(id); jmsTemplate.convertAndSend(ClusteringMessage.QUEUE, message); } }
ClusteringProducer { public void syncSend(Integer id) { ClusteringMessage message = new ClusteringMessage(); message.setId(id); jmsTemplate.convertAndSend(ClusteringMessage.QUEUE, message); }  }
ClusteringProducer { public void syncSend(Integer id) { ClusteringMessage message = new ClusteringMessage(); message.setId(id); jmsTemplate.convertAndSend(ClusteringMessage.QUEUE, message); }  void syncSend(Integer id); }
ClusteringProducer { public void syncSend(Integer id) { ClusteringMessage message = new ClusteringMessage(); message.setId(id); jmsTemplate.convertAndSend(ClusteringMessage.QUEUE, message); }  void syncSend(Integer id);  }