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: Reuse AMQP connections for multiple publishers/subscribers #860

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

bstasyszyn
Copy link
Contributor

A single AMQP connection is reused for publishers and subscribers. This reduces the total number of connections, which lowers RabbitMQ resources consumed. Once the channel limit of the connection is reached, a new connection is created for additional subscribers/publishers.

closes #856

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

A single AMQP connection is reused for publishers and subscribers. This reduces the total number of connections, which lowers RabbitMQ resources consumed. Once the channel limit of the connection is reached, a new connection is created for additional subscribers/publishers.

closes trustbloc#856

Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
@cla-bot cla-bot bot added the cla-signed label Nov 4, 2021
@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #860 (c768307) into main (8cf8561) will decrease coverage by 0.11%.
The diff coverage is 87.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #860      +/-   ##
==========================================
- Coverage   89.41%   89.29%   -0.12%     
==========================================
  Files         148      148              
  Lines       13160    13168       +8     
==========================================
- Hits        11767    11759       -8     
- Misses        855      865      +10     
- Partials      538      544       +6     
Impacted Files Coverage Δ
pkg/activitypub/service/vct/vct.go 89.58% <0.00%> (-1.91%) ⬇️
pkg/anchor/util/util.go 80.00% <0.00%> (-5.72%) ⬇️
pkg/pubsub/amqp/amqppubsub.go 89.69% <91.78%> (-2.47%) ⬇️
pkg/vcsigner/signer.go 96.61% <0.00%> (-1.10%) ⬇️
pkg/context/context.go 100.00% <0.00%> (ø)

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 675595e...c768307. Read the comment docs.

@fqutishat fqutishat merged commit edfe4cd into trustbloc:main Nov 4, 2021
@bstasyszyn bstasyszyn deleted the 856-2 branch November 4, 2021 19:43
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 a shared AMQP connection for subscribers and publishers
3 participants