Skip to content

Make all client properties optional #57

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

Closed

Conversation

lukebakken
Copy link
Collaborator

Fixes #56

Originally found by @tomtaoran

Copy link
Collaborator

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

Another option here could be to mark ClientCapabilities as #[serde(default)] and add Default to the #[derive(..)] list. That should behave the same but then any code that handles this doesn't need to mess with the Option wrappers. It's a bit cleaner if the lack of basic_nack for example is the same thing as explicitly setting false.

The same trick could be applied to ClientProperties above

@michaelklishin
Copy link
Owner

michaelklishin commented Jun 28, 2025

I'll do what @the-mikedavis has suggested, using Serde defaults here is arguably the right thing to do.

@lukebakken @the-mikedavis I have invited you to be collaborators in this repo.

michaelklishin added a commit that referenced this pull request Jun 28, 2025
Usually the will be but even some very mature client
libraries can (usually by mistake) for get to list
a capability.

Closes #56, references #57, references pika/pika#1530.
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.

Clients that don't advertise the exchange_exchange_bindings capability can't have connections listed.
3 participants