Add get queue and peek queue api methods
Bug fixing