-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Description
What happened?
We register multiple coders for PubsubMessage:
Lines 32 to 40 in 9b2f87d
| public List<CoderProvider> getCoderProviders() { | |
| return ImmutableList.of( | |
| CoderProviders.forCoder( | |
| TypeDescriptor.of(PubsubMessage.class), PubsubMessageWithAttributesCoder.of()), | |
| CoderProviders.forCoder( | |
| TypeDescriptor.of(PubsubMessage.class), PubsubMessageWithMessageIdCoder.of()), | |
| CoderProviders.forCoder( | |
| TypeDescriptor.of(PubsubMessage.class), | |
| PubsubMessageWithAttributesAndMessageIdCoder.of())); |
But in practice everything but the first one is a no-op. We will never use them (see #22216 (comment) for a detailed explanation). This means that in cases where the coder for a PCollection<PubsubMessage> is inferred, we will use PubsubMessageWithAttributesCoder, which does not handle messageID or orderingKey.
Issue Priority
Priority: 2
Issue Component
Component: io-java-gcp