public Message getMessageById ( String id ) throws IOException { String url = "queues/" + name + "/messages/" + id ; IronReader reader = client . get ( url ) ; MessageContainer container = gson . fromJson ( reader . reader , MessageContainer . class ) ; reader . close ( ) ; return container . getMessage ( ) ; }
Retrieves Message from the queue by message id . If there are no items on the queue an EmptyQueueException is thrown .