egalpin commented on issue #21162:
URL: https://github.com/apache/beam/issues/21162#issuecomment-1369333569

   Yes publishing messages with an ordering key is now supported in the Java 
SDK as well, added by https://github.com/apache/beam/pull/22216. I believe this 
should be included in SDK v2.43.0 and higher. 
   
   Using ordering key is supported by employing PubsubIO.writeMessages[1], 
where messages will need to be instantiated using the appropriate 
constructor[2] that accepts ordering keys. It’s also worth noting that pubsub 
write can make use of regional endpoints[3], which might be required for your 
use case to fully ensure ordering. 
   
   [1] 
https://beam.apache.org/releases/javadoc/2.43.0/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.html#writeMessages--
   [2] 
https://beam.apache.org/releases/javadoc/2.43.0/org/apache/beam/sdk/io/gcp/pubsub/PubsubMessage.html
   [3] 
https://beam.apache.org/releases/javadoc/2.43.0/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Write.html#withPubsubRootUrl-java.lang.String-


-- 
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]

Reply via email to