Package org.jclouds.openstack.marconi.v1.features

Examples of org.jclouds.openstack.marconi.v1.features.MessageApi.stream()


   private void streamMessages() {
      System.out.format("Stream Messages%n");

      MessageApi messageApi = marconiApi.getMessageApiForZoneAndClientAndQueue(ZONE, CONSUMER_ID, NAME);
      MessageStream stream = messageApi.stream();
      String marker = "";

      while(stream.nextMarker().isPresent()) {
         for (Message message: stream) {
            Properties messageProps = loadStringProperties(message.getBody());
View Full Code Here


               break;
            }
         }

         marker = stream.nextStreamOptions().getMarker();
         stream = messageApi.stream(stream.nextStreamOptions());
      }

      stream = messageApi.stream(marker(marker));

      while(stream.nextMarker().isPresent()) {
View Full Code Here

         marker = stream.nextStreamOptions().getMarker();
         stream = messageApi.stream(stream.nextStreamOptions());
      }

      stream = messageApi.stream(marker(marker));

      while(stream.nextMarker().isPresent()) {
         for (Message message: stream) {
            Properties messageProps = loadStringProperties(message.getBody());
            int messageNum = Integer.valueOf(messageProps.getProperty(MESSAGE_NUM));
View Full Code Here

            int messageNum = Integer.valueOf(messageProps.getProperty(MESSAGE_NUM));

            System.out.format("  Read message %d%n", messageNum);
         }

         stream = messageApi.stream(stream.nextStreamOptions());
      }
   }

   private void deleteQueue() {
      queueApi.delete(NAME);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.