|
36 | 36 | import com.google.api.gax.rpc.StreamController; |
37 | 37 | import com.google.cloud.pubsub.v1.MessageDispatcher.AckProcessor; |
38 | 38 | import com.google.cloud.pubsub.v1.stub.SubscriberStub; |
39 | | -import com.google.common.collect.ImmutableList; |
40 | | -import com.google.common.collect.ImmutableMap; |
41 | 39 | import com.google.common.collect.Lists; |
42 | 40 | import com.google.common.util.concurrent.MoreExecutors; |
43 | 41 | import com.google.protobuf.Any; |
@@ -88,8 +86,6 @@ final class StreamingSubscriberConnection extends AbstractApiService implements |
88 | 86 |
|
89 | 87 | private Duration inititalStreamAckDeadline; |
90 | 88 |
|
91 | | - private final Map<String, List<String>> streamMetadata; |
92 | | - |
93 | 89 | private final SubscriberStub subscriberStub; |
94 | 90 | private final int channelAffinity; |
95 | 91 | private final String subscription; |
@@ -138,9 +134,6 @@ private StreamingSubscriberConnection(Builder builder) { |
138 | 134 | inititalStreamAckDeadline = builder.maxDurationPerAckExtension; |
139 | 135 | } |
140 | 136 |
|
141 | | - streamMetadata = |
142 | | - ImmutableMap.of("x-goog-request-params", ImmutableList.of("subscription=" + subscription)); |
143 | | - |
144 | 137 | subscriberStub = builder.subscriberStub; |
145 | 138 | channelAffinity = builder.channelAffinity; |
146 | 139 |
|
@@ -280,9 +273,7 @@ private void initialize() { |
280 | 273 | .streamingPullCallable() |
281 | 274 | .splitCall( |
282 | 275 | responseObserver, |
283 | | - GrpcCallContext.createDefault() |
284 | | - .withChannelAffinity(channelAffinity) |
285 | | - .withExtraHeaders(streamMetadata)); |
| 276 | + GrpcCallContext.createDefault().withChannelAffinity(channelAffinity)); |
286 | 277 |
|
287 | 278 | logger.log(Level.FINER, "Initializing stream to subscription {0}", subscription); |
288 | 279 | // We need to set streaming ack deadline, but it's not useful since we'll modack to send receipt |
|
0 commit comments