Skip to content
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

Direct get #636

Merged
merged 7 commits into from
Sep 14, 2022
Merged

Direct get #636

merged 7 commits into from
Sep 14, 2022

Conversation

Jarema
Copy link
Member

@Jarema Jarema commented Sep 12, 2022

No description provided.

Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

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

Naming bike shedding, mirror raw message API as much as it makes sense

Ok(response)
}

pub async fn direct_get_by_sequence(&self, sequence: u64) -> Result<Message, Error> {
Copy link
Collaborator

@caspervonb caspervonb Sep 12, 2022

Choose a reason for hiding this comment

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

Naming:

Suggested change
pub async fn direct_get_by_sequence(&self, sequence: u64) -> Result<Message, Error> {
pub async fn get_direct_message_by_sequence(&self, sequence: u64) -> Result<Message, Error> {

}
Ok(response)
}
pub async fn direct_get_next_for_subject(&self, subject: String) -> Result<Message, Error> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Mirrors raw message API

Suggested change
pub async fn direct_get_next_for_subject(&self, subject: String) -> Result<Message, Error> {
pub async fn get_next_direct_message_by_subject(&self, subject: String) -> Result<Message, Error> {

Copy link
Member Author

Choose a reason for hiding this comment

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

direct.get -> get_direct is fine. The difference in API is though, that direct supports also next, so message_by_subject is ambiguous enough, that user would have to read docs to be sure if its next or last.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Completely qualify it? e.g get_next_direct_message_by_subject

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't like phrasing get....direct_message. It's not a direct message. The name comes from the fact it can be ... fetched from any replica set member. Direct message does not make sense. Its Directly getting a normal Stream Message.

@Jarema Jarema marked this pull request as ready for review September 13, 2022 07:24
Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

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

lgtm

@Jarema Jarema merged commit e26585a into main Sep 14, 2022
@Jarema Jarema deleted the jarema/direct-get branch September 14, 2022 20:09
@Jarema Jarema mentioned this pull request Sep 20, 2022
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.

2 participants