egalpin commented on issue #21162:
URL: https://github.com/apache/beam/issues/21162#issuecomment-1371259467
thanks @codertimu , I can reproduce the issue of lost orderingKey locally as
well using something like this:
```java
pipeline.apply(
Create.of(
new PubsubMessage(
"{\"baz\": \"jazz\"}".getBytes(StandardCharsets.UTF_8),
Collections.singletonMap("foo", "bar"),
null,
"1")))
.setCoder(PubsubMessageWithAttributesAndMessageIdAndOrderingKeyCoder.of());
...
```
Attaching a debugger and stepping through, I can see that the Coder in
`Create` is `PubsubMessageWithAttributesCoder` (the first element in the
[PubsubCoderProviderRegistrar](https://github.com/apache/beam/blob/9a22bf68767b8fa27aa381d6ff84e381a21af5a4/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubCoderProviderRegistrar.java)).
This obviously needs to be fixed, and I believe will be fixed by altering
the registrar to use
`PubsubMessageWithAttributesAndMessageIdAndOrderingKeyCoder` as default (i.e.
fixing https://github.com/apache/beam/issues/23525), but if you're able to
could you verify if this behaviour persists with any runner which is not the
test runner?
--
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]