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

Adding support for using multiple RabbitMQ channels per connection #77

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

bclougherty
Copy link

This ticket is an alternate attempt to address #57 by using multiple RabbitMQ channels per connection. Since each channel runs in its own goroutine, the processors are also running concurrently. This allows control over the degree of concurrency by specifying a fixed number of channels to use for any given instance, while maintaining a single TCP connection to the server.

The default behavior is to use a single channel, which will give exactly the same result as the current version, Adding --num-channels X at the command line will open multiple channels. As long as the GOMAXPROCS env variable is at least X, this will allow running X concurrent processors handing messages from the queue.

Copy link
Owner

@corvus-ch corvus-ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Brendan,

Thanks for your contribution. This one looks promising and I like the approach you took. I have made some comments and suggesting some improvements to make. Besides that, can you please have a look hat those integration tests(TEST_ARGS="-tags=integration" make test). They seem to be stuck somewhere.

consumer/setup.go Outdated Show resolved Hide resolved
consumer/consumer.go Outdated Show resolved Hide resolved
consumer/channel_list.go Outdated Show resolved Hide resolved
consumer/channel_list.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants