Skip to content

Round robin#206

Closed
neurosnap wants to merge 7 commits intomainfrom
round-robin
Closed

Round robin#206
neurosnap wants to merge 7 commits intomainfrom
round-robin

Conversation

@neurosnap
Copy link
Member

No description provided.

func (b *BaseBroker) SetDispatcher(dispatcher MessageDispatcher, channels []*Channel) error {
for _, channel := range channels {
dataChannel := b.ensureChannel(channel)
if reflect.TypeOf(dataChannel.Dispatcher) != reflect.TypeOf(dispatcher) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is kind of jank but every SetDispatch will wipe the previous dispatcher which does hold state so we check if the same type of dispatcher is being set and if so ignore it.

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.

1 participant