public String push ( String msg , long delay ) throws IOException { Message message = new Message ( ) ; message . setBody ( msg ) ; message . setDelay ( delay ) ; Messages msgs = new Messages ( message ) ; IronReader reader = client . post ( "queues/" + name + "/messages" , msgs ) ; Ids ids = gson . fromJson ( reader . reader , Ids . class ) ; reader . close ( ) ; return ids . getId ( 0 ) ; }
Pushes a message onto the queue .