Does google pub sub deliver messages to dead letter queues with the same message id?

207 views Asked by At

If you have topic t1 with subscriber s1 and s1 has dead letter forwarding to topic t2 with subscription s2, then do messages delivered to s1 have the same ids as their versions delivered to s2?

My preliminary testing indicates the ids are not the same but I'll need to double check.

1

There are 1 answers

0
kiran mathew On BEST ANSWER

Your observation is correct only messageids are unique per topic even for dead letters. According to the google cloud documentation

ID of the message, is assigned by the server when the message is published to be unique within the topic. Pub/sub guarantees that messageId is always unique per topic.