@Test public void sendMessageTest() throws Exception { AmqpMessageReceiver receiver = new AmqpMessageReceiver("guest", "guest", "myTopicLookup"); AmqpBasicListener listener = new AmqpBasicListener(); receiver.setMessageConsumer(listener); AmqpMessageProducer producer = new AmqpMessageProducer("guest", "guest", "myTopicLookup"); producer.sendMessage("testX"); Thread.sleep(1000l); assertEquals("topic.pepito", listener.getDestination()); assertEquals("testX", listener.getMessage()); receiver.close(); producer.close(); }
public void sendMessage(String message) throws JMSException { logger.info("Sending message to queue/topic: " + queueOrTopic); logger.debug("Message: " + message); TextMessage testMessage = session.createTextMessage(message); messageProducer.send(testMessage, DeliveryMode.NON_PERSISTENT, Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE); }
AmqpMessageProducer extends AmqpAbstract { public void sendMessage(String message) throws JMSException { logger.info("Sending message to queue/topic: " + queueOrTopic); logger.debug("Message: " + message); TextMessage testMessage = session.createTextMessage(message); messageProducer.send(testMessage, DeliveryMode.NON_PERSISTENT, Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE); } }
AmqpMessageProducer extends AmqpAbstract { public void sendMessage(String message) throws JMSException { logger.info("Sending message to queue/topic: " + queueOrTopic); logger.debug("Message: " + message); TextMessage testMessage = session.createTextMessage(message); messageProducer.send(testMessage, DeliveryMode.NON_PERSISTENT, Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE); } AmqpMessageProducer(String user, String password, String queueOrTopic);  AmqpMessageProducer(String url, String user, String password, String queueOrTopicName, boolean topic); }
AmqpMessageProducer extends AmqpAbstract { public void sendMessage(String message) throws JMSException { logger.info("Sending message to queue/topic: " + queueOrTopic); logger.debug("Message: " + message); TextMessage testMessage = session.createTextMessage(message); messageProducer.send(testMessage, DeliveryMode.NON_PERSISTENT, Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE); } AmqpMessageProducer(String user, String password, String queueOrTopic);  AmqpMessageProducer(String url, String user, String password, String queueOrTopicName, boolean topic); void sendMessage(String message); }
AmqpMessageProducer extends AmqpAbstract { public void sendMessage(String message) throws JMSException { logger.info("Sending message to queue/topic: " + queueOrTopic); logger.debug("Message: " + message); TextMessage testMessage = session.createTextMessage(message); messageProducer.send(testMessage, DeliveryMode.NON_PERSISTENT, Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE); } AmqpMessageProducer(String user, String password, String queueOrTopic);  AmqpMessageProducer(String url, String user, String password, String queueOrTopicName, boolean topic); void sendMessage(String message);  }