-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support Notification-style Publish. #9
Support Notification-style Publish. #9
Conversation
Signed-off-by: ChenYing Kuo <evshary@gmail.com>
Signed-off-by: ChenYing Kuo <evshary@gmail.com>
Hey @sophokles73 -- can I have you take a look at this to make sure I asked @evshary to do the right thing? We're trying to handle Notification-style |
name: "body.access".to_string(), | ||
version_major: Some(1), | ||
id: Some(1234), | ||
fn create_utransport_uuri(index: u8) -> UUri { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea that you'd in the future keep adding more UUri
s in here for testing purposes and you want to have a single factory function for creating them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. That's my intention.
Feel free to give me your opinions about this. I'm still wondering whether there is a more elegant way to do so.
@@ -482,7 +482,13 @@ impl UTransport for UPClientZenoh { | |||
) | |||
})?; | |||
// Get Zenoh key | |||
let topic = attributes.clone().source; | |||
let topic = if attributes.sink.is_some() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, seems like this is what we need 🙂
Just wanna get some input from @sophokles73
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is correct to assume that you are dealing with a Notification if sink is not empty and a Publish otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from the nit comment on the unit tests, I'll go ahead and approve 🙂
As @PLeVasseur mentioned in #6, support Notification-style Publish.