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

Allow sending streams and not just receiving them #121

Merged
merged 2 commits into from
May 14, 2024
Merged

Conversation

ghostdogpr
Copy link
Collaborator

Messenger now has 4 different ways of sending a message:

  • send for sending a single message and receiving a single response
  • sendStream for sending a stream of messages without receiving any response
  • sendAndReceiveStream for sending a single message and receiving a stream of responses (was previously named sendStream)
  • sendStreamAndReceiveStream for sending a stream of messages and receiving a stream of responses

/**
* Send a message to a pod and receive a stream of replies
*/
def sendMessageStreaming(pod: PodAddress, message: BinaryMessage): ZStream[Any, Throwable, Array[Byte]]
def sendMessageAndReceiveStream(pod: PodAddress, message: BinaryMessage): ZStream[Any, Throwable, Array[Byte]]

Choose a reason for hiding this comment

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

Any particular reason to diverge the wording between sendMessageAndReceiveStream and sendAndReceiveStream?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mostly to avoid renaming existing sendMessage which would increase breaking changes.

@ghostdogpr ghostdogpr merged commit b0e96bd into series/2.x May 14, 2024
4 checks passed
@ghostdogpr ghostdogpr deleted the send-stream branch May 14, 2024 07:46
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