-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Could you keep the 'v1.0.0' interface? #2
Comments
Heh. I was going to suggest the opposite, that the current interface stutters quite a bit. My concern is more aesthetic tho, as Go Stockholm Syndrome kicks in. |
First of all @michilu sorry for a very late reply. I meant to reply earlier but after i read your issue at work I forgot to do so after work. The main goal for Also earlier the concurrency was limited on a global level meaning one queue per all handler of all topics. in I encourage you to contribute. I am sure together we can workout best performance interface. More use cases gives more insides on actual message-bus usability and performance. As to the benchmark I suppose we could call Line 28 in 116e5c3
|
@vardius Thanks for your reply. My use case that implements with your message-bus is this. I want to use a lightweight pub/sub. If you no problem, close this issue. |
Would be good to know what is the opinion of other ppl as well. As to your request we could add new constructor something like this // NewAsync creates new MessageBus that always spawns goroutines
func NewAsync() MessageBus {
return New(runtime.NumCPU())
} which would create new bus with preset number of concurrent calls. maybe we could set it to -1 and then not use buffered channels but call handler directly ? ideally we create strategy interface (async, sync) and based on that we use buffered channels ? |
I’m closing this issue because it has been inactive for a while. Please use the https://github.com/vardius/message-bus/releases/tag/v1.0.0 for v1.0.0 interface. Keep in mind that by using older release you loose recent bug fixes and futures. Thank you! |
I like the new interface. Really, I used the semaphore to control concurrency outside the bus.
And, I hope to keeps both the old interface and the new interface.
v1.0.0
message-bus/bus.go
Line 82 in c1f01b6
v1.1.0
message-bus/bus.go
Line 93 in bdb2394
Ref: dd40db9#diff-ecf9c6bcdc8d97b7f04226e8857c1108L82
The text was updated successfully, but these errors were encountered: