scwhittle commented on code in PR #26063:
URL: https://github.com/apache/beam/pull/26063#discussion_r1172954922
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.java:
##########
@@ -1447,27 +1453,25 @@ public void processElement(@Element PubsubMessage
message, @Timestamp Instant ti
}
// NOTE: The record id is always null.
- currentTopicOutput.add(
+ currentTopicOutput.messages.add(
OutgoingMessage.of(
msgBuilder.build(), timestamp.getMillis(), null,
message.getTopic()));
- currentOutputBytes.put(pubsubTopic, currentTopicOutputBytes +
messageSize);
+ currentTopicOutput.bytes += messageSize;
}
@FinishBundle
public void finishBundle() throws IOException {
publish();
output = null;
- currentOutputBytes = null;
pubsubClient.close();
pubsubClient = null;
}
private void publish() throws IOException {
Review Comment:
inline this in finishBundle? otherwise the topic specific publish should be
called
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]