wagslane / go-rabbitmq

A wrapper of streadway/amqp that provides reconnection logic and sane defaults
https://blog.boot.dev/golang/connecting-to-rabbitmq-in-golang-easy/
MIT License
768 stars 125 forks source link

Goroutine pool #88

Closed eshine996 closed 1 year ago

eshine996 commented 1 year ago

Will Goroutine pool be added?

wagslane commented 1 year ago

Not sure what this means? You're able to use n-number of goroutines already

shoham-b commented 1 year ago

Something like this https://github.com/Jeffail/tunny

eshine996 commented 1 year ago

Not sure what this means? You're able to use n-number of goroutines already

I mean, the current Goroutine will not restart after panic an error?. Whether the ants library can be imported for concurrent execution.

eshine996 commented 1 year ago

for i := 0; i < options.Concurrency; i++ { go handlerGoroutine(consumer, msgs, options, handler) }

Concurrency=100; if one handler panic error.Concurrency=100-1.

wagslane commented 1 year ago

Ah I see. Yeah that's out of the scope of this project. Your goroutines shouldn't be panicking! Try to fix that problem is what I'd argue.