Skip to content

Commit

Permalink
Revert "fix: Set x-goog-request-params for streaming pull request"
Browse files Browse the repository at this point in the history
This reverts commit 3185a3e.
  • Loading branch information
kamalaboulhosn committed Mar 14, 2023
1 parent 3185a3e commit 3b1f4d9
Showing 1 changed file with 1 addition and 10 deletions.
Expand Up @@ -36,8 +36,6 @@
import com.google.api.gax.rpc.StreamController;
import com.google.cloud.pubsub.v1.MessageDispatcher.AckProcessor;
import com.google.cloud.pubsub.v1.stub.SubscriberStub;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.protobuf.Any;
Expand Down Expand Up @@ -88,8 +86,6 @@ final class StreamingSubscriberConnection extends AbstractApiService implements

private Duration inititalStreamAckDeadline;

private final Map<String, List<String>> streamMetadata;

private final SubscriberStub subscriberStub;
private final int channelAffinity;
private final String subscription;
Expand Down Expand Up @@ -138,9 +134,6 @@ private StreamingSubscriberConnection(Builder builder) {
inititalStreamAckDeadline = builder.maxDurationPerAckExtension;
}

streamMetadata =
ImmutableMap.of("x-goog-request-params", ImmutableList.of("subscription=" + subscription));

subscriberStub = builder.subscriberStub;
channelAffinity = builder.channelAffinity;

Expand Down Expand Up @@ -280,9 +273,7 @@ private void initialize() {
.streamingPullCallable()
.splitCall(
responseObserver,
GrpcCallContext.createDefault()
.withChannelAffinity(channelAffinity)
.withExtraHeaders(streamMetadata));
GrpcCallContext.createDefault().withChannelAffinity(channelAffinity));

logger.log(Level.FINER, "Initializing stream to subscription {0}", subscription);
// We need to set streaming ack deadline, but it's not useful since we'll modack to send receipt
Expand Down

0 comments on commit 3b1f4d9

Please sign in to comment.