vmeretail / subscriptionservice

Lightweight and easy to use library, which allows you to manage you delivering events from persistent subscriptions.
12 stars 0 forks source link

New HttpClient being created on each Publish #25

Closed StevenBlair123 closed 4 years ago

StevenBlair123 commented 4 years ago

Inside SubscriptionService, we have the folloiwng code:

using (var httpClient = new HttpClient())

This is pretty inefficient, and we should look at building a HttpClient per endpoint (at least) to benefit from conenction pooling.

My guess is, this needs to live somewhere along with each Subscription.

Need to work out the best way to go about this.

StevenBlair123 commented 4 years ago

A new httpClient specific to the Subscription is now available in the Subscription (Domain), so this should be a quick change.

StevenBlair123 commented 4 years ago

39 waiting for review.