Skip to content
This repository was archived by the owner on Jan 1, 2019. It is now read-only.
This repository was archived by the owner on Jan 1, 2019. It is now read-only.

Time out error #80

Description

@harjitdotsingh

Hi there,

I have this code

 ParallelTask pt = parallelClient.prepareHttpGet("/search/query?q=$QUERY")
                .setHttpHeaders(new ParallecHeader().addPair("x-user", env.getProperty("ifi.user")).addPair("x-password", env.getProperty("ifi.password"))).setProtocol(RequestProtocol.HTTPS)
                .setHttpPort(443)
                .async()
                .setReplaceVarMapToSingleTargetSingleVar("QUERY", queryList, "cdws21.ificlaims.com")
                .setResponseContext(returnMap)
                .execute((res, responseContext) -> {
                    String resourcePath = res.getRequest().getResourcePath();
                    String keyword = resourcePath.substring(resourcePath.lastIndexOf('=') + 1);
                    returnMap.put(keyword, res.getResponseContent());

                });


        while (!pt.isCompleted()) {

            try {
                Thread.sleep(500L);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }

I see that sometimes we get this error

see this in our parallel request sender [1]__RESP_RECV_IN_MGR 1 (+0) / 1 (100.00%) AFT 14.125 S @ API_0 @ 2018.02.16.15.47.51.239-0500 , TaskID : ded015e3-cae , CODE: NA, RESP_BRIEF: EMPTY , ERR: java.util.concurrent.TimeoutException: No response received after 14000

How can we be notified of the completion of the results. Right now this loop is tight and I don't like it. Is there any way to use Futures and or PRomises ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions