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

Add Message Request APIs #411

Merged
merged 5 commits into from
Oct 5, 2020
Merged

Add Message Request APIs #411

merged 5 commits into from
Oct 5, 2020

Conversation

ColinSullivan1
Copy link
Member

@ColinSullivan1 ColinSullivan1 commented Oct 4, 2020

Add Request and RequestAsync APIs to support requests passing a NATS message (and thus supporting headers).

Resolves #409

Signed-off-by: Colin Sullivan [email protected]

Signed-off-by: Colin Sullivan <[email protected]>
Signed-off-by: Colin Sullivan <[email protected]>
Copy link
Contributor

@matthiashanel matthiashanel left a comment

Choose a reason for hiding this comment

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

Code LGTM, not sure if Task needs mentioning in comments.
If not I'll Approve

@@ -3294,6 +3373,177 @@ public Task<Msg> RequestAsync(string subject, byte[] data, int offset, int count
return requestAsync(subject, null, data, offset, count, Timeout.Infinite, token);
}

/// <summary>
/// Asynchronously sends a request payload and returns the response <see cref="Msg"/>, or throws
Copy link
Contributor

Choose a reason for hiding this comment

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

correct cref?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, it links.

src/NATS.Client/Conn.cs Outdated Show resolved Hide resolved
src/NATS.Client/Conn.cs Outdated Show resolved Hide resolved
src/NATS.Client/Conn.cs Outdated Show resolved Hide resolved
src/NATS.Client/IConnection.cs Show resolved Hide resolved
Signed-off-by: Colin Sullivan <[email protected]>
Copy link
Contributor

@matthiashanel matthiashanel left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Colin Sullivan <[email protected]>
Copy link
Contributor

@matthiashanel matthiashanel left a comment

Choose a reason for hiding this comment

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

LGTM

@ColinSullivan1
Copy link
Member Author

Thanks @matthiashanel , once tests are green I'll merge.

Signed-off-by: Colin Sullivan <[email protected]>
@ColinSullivan1
Copy link
Member Author

ColinSullivan1 commented Oct 5, 2020

Test pass, the issue is with timeouts when publishing the build artifacts. Will merge.

@ColinSullivan1 ColinSullivan1 merged commit 34ed44a into master Oct 5, 2020
@ColinSullivan1 ColinSullivan1 deleted the request-msg-api branch October 5, 2020 18:54
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.

Feature request: Add headers to the request API.
2 participants