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

Feature request: Output stream response online #329

Closed
murfel opened this issue Aug 12, 2022 · 4 comments
Closed

Feature request: Output stream response online #329

murfel opened this issue Aug 12, 2022 · 4 comments

Comments

@murfel
Copy link

murfel commented Aug 12, 2022

I have a GRPC service with a method that returns a stream of messages. In particular, this is an infinite stream (use case: messenger). When I call this method with grpcurl, it doesn't show any output, as it never reaches the end of stream. Is it possible to output messages online, once they are received, without waiting for the end of stream? Thank you!

@dragonsinth
Copy link
Member

Oh that's interesting.... that seems totally reasonable.

@dragonsinth
Copy link
Member

Hi @murfel I was able to get this to work out of the box using the chatterbox example server, found here: https://github.com/fullstorydev/go/tree/master/examples/chatterbox

~/github/go/src/github.com/fullstorydev/go/examples/chatterbox grpcurl -import-path . -proto chatterbox.proto -plaintext -d '{}' 127.0.0.1:9000 chatterbox.ChatterBox/Monitor
{
  
}
{
  "who": "User 1",
  "what": "JOIN"
}
{
  "who": "User 1",
  "what": "CHAT",
  "text": "hi"
}

@murfel
Copy link
Author

murfel commented Aug 16, 2022

Hi @dragonsinth! Oh, thank you. I checked it myself and it does work. It was an error in my code. I must have been very tired debugging other stuff back then. Sorry for disruption!

@dragonsinth
Copy link
Member

No worries, thanks for getting back and confirming! :)

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

No branches or pull requests

2 participants