Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use multiple publisher pools if pool size is to large #1373

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

bstasyszyn
Copy link
Contributor

If the pool size exceeds the maximum number of channels per connection then multiple publisher pools are created, each pool having a dedicated connection. The pools are distributed evenly.

Also renamed startup parameter/environment variable from mq-max-connection-subscriptions/MQ_MAX_CONNECTION_SUBSCRIPTIONS to mq-max-connection-channels/MQ_MAX_CONNECTION_CHANNELS since it is used for publisher as well as subscriber pools.

closes #1372

Signed-off-by: Bob Stasyszyn Bob.Stasyszyn@securekey.com

If the pool size exceeds the maximum number of channels per connection then multiple publisher pools are created, each pool having a dedicated connection. The pools are distributed evenly.

Also renamed startup parameter/environment variable from mq-max-connection-subscriptions/MQ_MAX_CONNECTION_SUBSCRIPTIONS to mq-max-connection-channels/MQ_MAX_CONNECTION_CHANNELS since it is used for publisher as well as subscriber pools.

closes trustbloc#1372

Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
@cla-bot cla-bot bot added the cla-signed label Jun 22, 2022
@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #1373 (4bed908) into main (c5e79fc) will increase coverage by 0.05%.
The diff coverage is 86.86%.

@@            Coverage Diff             @@
##             main    #1373      +/-   ##
==========================================
+ Coverage   87.76%   87.82%   +0.05%     
==========================================
  Files         199      200       +1     
  Lines       18595    18729     +134     
==========================================
+ Hits        16320    16448     +128     
- Misses       1461     1465       +4     
- Partials      814      816       +2     
Impacted Files Coverage Δ
cmd/orb-server/startcmd/start.go 67.92% <0.00%> (ø)
pkg/pubsub/amqp/amqppubsub.go 87.92% <75.00%> (-0.97%) ⬇️
cmd/orb-server/startcmd/params.go 81.95% <100.00%> (ø)
pkg/pubsub/amqp/publisherpool.go 100.00% <100.00%> (ø)
pkg/linkset/linkset.go 89.95% <0.00%> (+3.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5e79fc...4bed908. Read the comment docs.

@fqutishat fqutishat merged commit 31a2bb3 into trustbloc:main Jun 22, 2022
@bstasyszyn bstasyszyn deleted the publisherconnpool branch June 30, 2022 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use multiple publisher pools, each with its own connection
2 participants