Skip to content

command: register support topic/channel state#305

Closed
maplessssy wants to merge 6 commits into
nsqio:masterfrom
maplessssy:sync_topic_channel_state
Closed

command: register support topic/channel state#305
maplessssy wants to merge 6 commits into
nsqio:masterfrom
maplessssy:sync_topic_channel_state

Conversation

@maplessssy

Copy link
Copy Markdown

command: register support topic/channel state
see nsq issue:1199

@maplessssy

Copy link
Copy Markdown
Author

hi, anyone can help to take a look at this?

@ploxiln

ploxiln commented Aug 7, 2020

Copy link
Copy Markdown
Member

Yeah, yeah, I saw it.

The interesting detail, is how current nsqlookupd will handle receiving more params. Backwards compatibility is needed while rolling out new versions. It looks like current nsqlookupd will ignore extra params, which is good.

There is another interesting detail: currently, topics/channels are only registered once, per connection to nsqlookupd, I think. But to use this, they will need to be re-registered whenever pause state changes. That's a possibly interesting change. There's also the fact that the topic pause state is sent redundantly when every channel state is sent ... not necessarily a problem for performance/efficiency, but rather confusion about what to do with multiple potentially conflicting reports. Always take the last topic state reported, even if that was just part of a channel state report/registration, I guess?

I think it will all work out fine, but it is good to clearly see how the details will look in the other projects, before finalizing this design. So, I would open up a pull request on the main nsq repo, modifying nsqd and nsqlookupd to use this new functionality, so we can see how that looks. You can try to temporarily modify the go.mod to use this commit of go-nsq so your nsq PR is able to build and test.

@maplessssy

maplessssy commented Aug 8, 2020

Copy link
Copy Markdown
Author

@ploxiln I hava opend up a pull request on the main nsq repo, see nsq pr. : )

@mreiferson

Copy link
Copy Markdown
Member

Building on @ploxiln's feedback, I think the underlying problem with this implementation is that it's not a "registration". Perhaps we need a new command that represents a topic/channel "state change"?

@maplessssy

Copy link
Copy Markdown
Author

Building on @ploxiln's feedback, I think the underlying problem with this implementation is that it's not a "registration". Perhaps we need a new command that represents a topic/channel "state change"?

I think a new command is good, it's more clearly that topic and channel state change can delivery more independently. @ploxiln and also resolve the topic pause state is sent redundantly when every channel state is sent .

Comment thread command.go Outdated
Comment thread command.go Outdated
@maplessssy

Copy link
Copy Markdown
Author

@mreiferson This PR is ready for review. PTAL.
/cc @ploxiln

@maplessssy
maplessssy requested a review from mreiferson August 14, 2020 15:34
Comment thread command.go Outdated
Comment thread command.go Outdated
@maplessssy
maplessssy requested a review from mreiferson August 15, 2020 13:54
@mreiferson

Copy link
Copy Markdown
Member

this is looking good, thanks for your patience!

@mreiferson mreiferson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, but let's not merge this until we're done with nsqio/nsq#1274

@maplessssy maplessssy closed this by deleting the head repository Mar 16, 2026
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.

3 participants