Uploaded image for project: 'mod-oai-pmh'
  1. mod-oai-pmh
  2. MODOAIPMH-316

Vertx WebClient fails to proccess JsonEvent stream (wait for Vert.x to fix)

    XMLWordPrintable

Details

    • CP: sprint 116, CP: sprint 117
    • 1
    • Core: Platform

    Description

      Overview:

      The functionality of streaming of jsons via http is used in mod-oai-pmh.

      For vert.x 3.9.1 is works well.

      After migration to vert.x 4.0.2 it fails on big ammount of data ethier using HttpClient or WebClient.

      The documentation for this functionality is: https://vertx.io/docs/vertx-web-client/java/#_decoding_responses

      This approach is used for WebClient: 

      JsonParser parser = JsonParser.newParser().objectValueMode();
      parser.handler(event -> {
        JsonObject object = event.objectValue();
        System.out.println("Got " + object.encode());
      });
      client
        .get(8080, "myserver.mycompany.com", "/some-uri")
        .as(BodyCodec.jsonStream(parser))
        .send()
        .onSuccess(res ->
          System.out.println("Received response with status code" + res.statusCode()))
        .onFailure(err ->
          System.out.println("Something went wrong " + err.getMessage()));
      

      Steps to Reproduce:
      Make a request to any env and you will receive the next message with 500 error - http://okapi-bugfest-honeysuckle.folio.ebsco.com:443/inventory-hierarchy/updated-instance-ids?deletedRecordSupport=true&skipSuppressedFromDiscoveryRecords=true
      Expected Results:
      Normal response
      Actual Results:
      Error

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                mikhail.fokanov Mikhail Fokanov
                TotoroDev Illia Daliek
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases