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.
Your observation is correct only messageid
s 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.