Uploaded image for project: 'mod-pubsub'
  1. mod-pubsub
  2. MODPUBSUB-202

Bad HTTP client pool utilitization in mod-pubsub-client

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Template:
    • Development Team:
      Vega
    • Release:
      Lotus R1 2022
    • Epic Link:

      Description

      mod-pubsub-client uses a modified version of the PubsubClient class. It's normally
      generated by RMB, but with MODPUBSUB-127 MODPUBSUB-133 it has its own copy.

      https://github.com/folio-org/mod-pubsub/blob/6aea9a028345a97c71f619b5382e88bed3f47a28/mod-pubsub-client/src/main/java/org/folio/rest/client/PubsubClient.java#L20

      Changing generated code and hope it still works is slightly suboptimal, as RMB has evolved since the paste's n copy.. In particular RMB has offered new constructors for its generated client. RMB-796 RMB-783

      At this stage mod-pubsub creates a HTTP pool for each PubsubClient usage and closes the pool afterwards.. A pool that has one HTTP socket at most.

      https://github.com/folio-org/mod-pubsub/blob/6aea9a028345a97c71f619b5382e88bed3f47a28/mod-pubsub-client/src/main/java/org/folio/util/pubsub/PubSubClientUtils.java#L63-L78

      A proper solution is to use one HttpClient or WebClient per Vert.x instance (which normally is just 1 in a module). Then use that for all HTTP communications.. Then sockets can be reused between each request, thus, resulting in faster HTTP operations.

      The, now, obsolete version of PubsubClient.java should be removed and RMB's generated version be used instead.

      While the mod-pubsub-client artifact is included in several projects, PubsubClient is only used in mod-pubsub-client itself and mod-remote-storage.

      https://github.com/search?q=org%3Afolio-org+PubsubClient&type=code

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                adam Adam Dickmeiss
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    TestRail: Runs

                      TestRail: Cases