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 to pull host from PUBSUB_EMULATOR_HOST #30

Open
SebScoFr opened this issue Apr 26, 2018 · 4 comments
Open

Feature request to pull host from PUBSUB_EMULATOR_HOST #30

SebScoFr opened this issue Apr 26, 2018 · 4 comments

Comments

@SebScoFr
Copy link

This plugin should have the ability to pull the PubSub host from the PUBSUB_EMULATOR_HOST environment variable, so that it can be used in dev mode with the PubSub emulator.

@josephlewis42
Copy link
Contributor

@SebScoFr update on this, I have the fix in this branch. I pulled the code that was doing the connections out of the Java lib and into the project so we can modify the host. The plugin seems to be working fine, but it looks like it's trying to send the emulator commands that it doesn't support.

Tagging @rosbo to see if he's seen something like this before because I think he's used the emulator.

@SebScoFr
Copy link
Author

SebScoFr commented May 9, 2018

Thanks @josephlewis42

@rosbo
Copy link

rosbo commented May 9, 2018

@josephlewis42 I have used it a little while ago and didn't see this issue, do you mind sharing the logs of the messages that are failing?

@josephlewis42
Copy link
Contributor

@rosbo after a little more digging it looks like it might be an encryption issue. The local Pub/Sub emulator does not use encryption and the library seemingly removed support for setting the transports to using plaintext with the gRPC client. It's a known issue googleapis/google-cloud-java#2248 and is on their work backlog.

Here are my logs from the Pub/Sub emulator with LogStash running:

[pubsub] May 09, 2018 4:56:23 PM io.gapi.emulators.grpc.GrpcServer$3 operationComplete
[pubsub] INFO: Adding handler(s) to newly registered Channel.
[pubsub] May 09, 2018 4:56:23 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
[pubsub] May 09, 2018 4:56:23 PM io.gapi.emulators.netty.NotFoundHandler handleRequest
[pubsub] INFO: Unknown request URI: /bad-request

Here they are with the Python client:

[pubsub] May 09, 2018 4:57:58 PM io.gapi.emulators.grpc.GrpcServer$3 operationComplete
[pubsub] INFO: Adding handler(s) to newly registered Channel.
[pubsub] May 09, 2018 4:57:58 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected HTTP/2 connection.

I could switch us over to using the HTTP2 client, but it's going to be a fair bit of work on our end and will probably decrease efficiency.

@josephlewis42 josephlewis42 removed their assignment May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants