I am facing an issue when publishing a google cloud pubsub message to a subscription with ordering enabled.
I have a pubsub topic : test_order_topic with a push subscription with Message ordering : Enabled (enableMessageOrdering: true).
But when publishing to this topic with a python Google Cloud function :
publisher.publish(
'projects/project_id/topics/test_order_pubsub',
json.dumps({ "index": len(WORDS) }).encode('utf-8'),
ordering_key='key1'
)
I get the following error :
Cannot publish a message with an ordering key when message ordering is not enabled.
test_order_pubsub have no other subscription
Could you help with this issue? Thanks!