ame589 commented on issue #26959:
URL: https://github.com/apache/beam/issues/26959#issuecomment-1700572281

   Hello @tvalentyn, I am facing the same issue using apache-beam 2.49.0 with 
python sdk 3.11.
   
   Basically, following the steps described in the [official documentation 
](https://beam.apache.org/releases/pydoc/2.49.0/apache_beam.io.gcp.pubsub.html#apache_beam.io.gcp.pubsub.WriteToPubSub),
 I have created a PubsubMessage object providing also the ordering_key.
   
   The finale result is that messages are correctly sent to PubSub but without 
any ordering key assigned: the ordering_key is always not visible on PubSub UI 
while if you use a different client, for example the google cli, I am able to 
see it in the messages.
   
    
   
   Do you have any idea of what could be the issue?
   
    
   
   
   Following the code snippet used:
   ``` pipeline
   | "Convert encoded message to PubsubMessage Object" >> beam.Map(lambda 
encodedMessage:beam.io.PubsubMessage(data=encodedMessage, 
attributes={"name":"test"}, ordering_key="testKey"))
   
   | "Publish message to PubSub" >> beam.io.WriteToPubSub(
               topic=f"projects/{configs['project']}/topics/{topic}", 
with_attributes=True)
   ) 
   


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