Hi, I’m using the “stompjms-client” to publish and subscribe messages from the Apollo MQ server. But when I try to receive messages the client is cleaning all messages in the server's queue and returning only the las message.The previous message are missed.
Below you can find the sample code: The command "connection.request(frame)" is getting all messages published in the server but the "client stompFrame" contains only the last published message. Is it possible to receive message by message from the server using “stompjms-client” 1.9? Does the StompFrame store all messages when *"connection.request(frame)"* is executed? / public void StartToListen() throws Exception{ try{ FutureConnection connection; Future future; Stomp stomp = new Stomp("XXXXXX", 61613); stomp.setLogin("XXXXX"); stomp.setPasscode("XXXXXX"); //stomp. future = stomp.connectFuture(); connection = future.await(); // Preparing the receive Future receiveFuture = connection.receive(); StompFrame frame = new StompFrame(SUBSCRIBE); frame.addHeader(DESTINATION, StompFrame.encodeHeader("/queue/test")); frame.addHeader(ID, connection.nextId()); System.out.println("Requesting to the server..."); *Future response = connection.request(frame);* System.out.println("Waiting result"); StompFrame received = response.await(); System.out.println("Message 1:" + received.toString()); System.out.println("Receiving receiveFuture"); StompFrame receivedFuture = receiveFuture.await(); System.out.println("Message 2:" + receivedFuture.toString()); }catch (Exception e) { System.out.println(e); } }/ Thanks, Best regards, Andre -- View this message in context: http://activemq.2283324.n4.nabble.com/Receiving-stomp-messages-from-ActiveMQ-using-stomp-client-1-9-tp4680283.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.