@Override
	public void doJob() {
		try 
		{
			//TODO wait till queue is empty and keep adding ISBN to array.
			
			System.out.println("Waiting for messages from " + queueName + "...");
			String body ="";
			Message msg;
			OrderBook book = new OrderBook();
			boolean isBookLost = false;
			
			while((msg = consumer.receive(1000*30)) !=null){
				if(msg instanceof StompJmsMessage ){
					StompJmsMessage smsg = ((StompJmsMessage) msg);
					body = smsg.getFrame().contentAsString();
					System.out.println("QueueConsumer Received message = " + body);
					String[] parts=body.split(":");
					System.out.println("ISBN Number to be sent ::"+parts[1]);
					book.setOrder_book_isbns(Integer.parseInt(parts[1]));
					isBookLost = true;
				}
			}
			if(isBookLost)
				submitBookOrder(book);
		}catch(Exception e){
			e.printStackTrace();
		}
	}