llamallamaduck commented on code in PR #31206:
URL: https://github.com/apache/beam/pull/31206#discussion_r1601610883
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.java:
##########
@@ -668,7 +668,7 @@ public static <T> Read<T> readAvros(Class<T> clazz) {
*/
public static <T> Read<T> readMessagesWithCoderAndParseFn(
Coder<T> coder, SimpleFunction<PubsubMessage, T> parseFn) {
- return Read.newBuilder(parseFn).setCoder(coder).build();
+ return
Read.newBuilder(parseFn).setCoder(coder).setNeedsAttributes(true).build();
Review Comment:
Aha, thanks for elaborating - makes sense! I have now gone with the simplest
solution that adds a new method `readMessagesWithAttributesWithCoderAndParseFn`.
While I agree this is "getting pretty gross" (or, already is), I'd think
that making it better as a whole deserves a separate change 👀
--
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]