Uh oh!
There was an error while loading. Please reload this page.
[BEAM-53] Pub/sub client with gRPC implementation - #120
Conversation
mshields822
commented
Apr 5, 2016
R: @kennknowles |
| import java.util.Collection; | ||
| /** | ||
| * A helper interface for talking to pub/sub via an underlying transport. |
There was a problem hiding this comment.
I think the official name is "Pubsub", no slash, capital P, lowercase 's'.
| /** | ||
| * Construct a new Pubsub grpc client. It should be closed via {@link #close} in order | ||
| * to ensure tidy cleanup of underlying netty resources. (Or use the try-with-resources | ||
| * construct since this class is {@link AutoCloseable}. If non-{@literal null}, use |
kennknowles
commented
Apr 11, 2016
Looks like checkstyle dislikes your copyright headers. |
mshields822
commented
Apr 12, 2016
Could do with a squash but this addresses your comments and supports some quirks needed later by the dataflow runner. |
mshields822
commented
Apr 12, 2016
Looking at the misc support code in PubsubIO thinks would be much clearer if we also had a PubsubApiaryClient and all the regex and other misc handling in PubsubIO was moved into PubsubClient. BUT I'd like to make steady progress, so how about we take that as a TODO? |
kennknowles
commented
Apr 12, 2016
LGTM. Merging. |
| /** | ||
| * A helper interface for talking to Pubsub via an underlying transport. | ||
| */ | ||
| public interface PubsubClient extends AutoCloseable { |
There was a problem hiding this comment.
It occurs to me that this PR would really benefit from a follow-up with an in-memory testing fake, with a test suite that can be applied to both it and the gRPC implementation.
davorbonaci
commented
Apr 13, 2016
I think this PR might not have received the attention it deserves:
Since this is IO-related, @dhalperi would be a really good reviewer. @mshields822, can I ask you to get these things fixed up? |
| package com.google.cloud.dataflow.sdk.io; | ||
| import com.google.api.client.repackaged.com.google.common.base.Preconditions; |
kennknowles
commented
Apr 13, 2016
Package-private would be better than |
mshields822
commented
Apr 13, 2016
No worries:
|
mshields822
commented
Apr 13, 2016
Also, the extra deps (beyond grpc-pubsub-v1) are all needed by the gRPC client. They are also included by the grpc-pubsub-v1 dep, but our transitive dependency check requires them to be included directly. You can find the same deps inside the bigtable-client-core pom. So the only new dep here is on grpc-pubsub-v1 itself. |
Support pub/sub via gRPC.
Will later use for pure Java pub/sub source/sink.