The system automatically creates an MPS queue when you open the MPS service. You can also manage the MPS queue (pipeline) by using interfaces. For example: SearchPipeline, QueryPipelineList, UpdatePipeline.

Search MPS queue

You can search the MPS queue information by using the SearchPipeline interface.
String region = "<region>";
    String accessKeyId = "<accessKeyId>";
    String accessKeySecret = "<accessKeySecret>";
    DefaultProfile profile = DefaultProfile.getProfile(region, accessKeyId, accessKeySecret);
    DefaultAcsClient client = new DefaultAcsClient(profile);
    SearchPipelineRequest request = new SearchPipelineRequest();
    // If an error occurs, it can throw ClientException or ServerException.
    SearchPipelineResponse response = client.getAcsResponse(request);
    List<SearchPipelineResponse.Pipeline> pipelines = response.getPipelineList();
    for (SearchPipelineResponse.Pipeline pipeline : pipelines) {
        System.out.println("pipeline id:" + pipeline.getId() + ", name:" + pipeline.getName() + ", state:" + pipeline.getState());
    }

Query MPS queue

If you know the pipelineId, you can use pipelineId to call QueryPipelineList interface to query MPS queue information.
String region = "<region>";
    String accessKeyId = "<accessKeyId>";
    String accessKeySecret = "<accessKeySecret>";
    // known pipeline ID, seperated by comma (,)
    String pipelineIds = "<pipelineIds>";
    DefaultProfile profile = DefaultProfile.getProfile(region, accessKeyId, accessKeySecret);
    DefaultAcsClient client = new DefaultAcsClient(profile);
    QueryPipelineListRequest request = new QueryPipelineListRequest();
    request.setPipelineIds(pipelineId);
    //If an error occurs, it can throw ClientException or ServerException
    QueryPipelineListResponse response = client.getAcsResponse(request);
    List<QueryPipelineListResponse.Pipeline> pipelines = response.getPipelineList();
    for (QueryPipelineListResponse.Pipeline pipeline : pipelines) {
        System.out.println("pipeline id:" + pipeline.getId() + ", name:" + pipeline.getName() + ", state:" + pipeline.getState());
    }

Update MPS queue

Use the UpdatePipeline interface to update MPS queue information, including MPS queue name and status. The status includes Active and Paused.
String region = "<region>";
    String accessKeyId = "<accessKeyId>";
    String accessKeySecret = "<accessKeySecret>";
    DefaultProfile profile = DefaultProfile.getProfile(region, accessKeyId, accessKeySecret);
    DefaultAcsClient client = new DefaultAcsClient(profile);
    // Search user pipeline, the number is one by default.
    SearchPipelineRequest searchPipelineRequest = new SearchPipelineRequest();
    // If an error occurs, it can throw ClientException or ServerException.
    SearchPipelineResponse searchPipelineResponse = client.getAcsResponse(searchPipelineRequest);
    List<SearchPipelineResponse.Pipeline> pipelines = searchPipelineResponse.getPipelineList();
    SearchPipelineResponse.Pipeline queryPipeline = pipelines.get(0);
    //Update MPS queue status
    UpdatePipelineRequest request = new UpdatePipelineRequest();
    request.setPipelineId(queryPipeline.getId());
    request.setState("Paused");
    request.setName(queryPipeline.getName());
    //If an error occurs, it can throw ClientException.
    UpdatePipelineResponse response = client.getAcsResponse(request);
    UpdatePipelineResponse.Pipeline pipeline = response.getPipeline();
    System.out.println("pipeline id:" + pipeline.getId() + ", name:" + pipeline.getName() + ", state:" + pipeline.getState());