有没有办法使用apache beam读取google pubsub消息的消息id

Is there way to read the message id of a google pubsub message using apache beam

您好,我正在尝试使用 apache beam 从 pubsub 中提取消息

PubsubIO.readMessagesWithAttributes().fromSubscription(myTopic)

我正在尝试将负载插入到 bigquery。我想检索 pubsub 将生成的消息 ID。

但是我获取不到,属性也没有消息id。

感谢任何帮助。

这是一个问题,目前正在跟踪 https://issues.apache.org/jira/browse/BEAM-3489

我们通过生成 UUID 并将消息存储在 BQ 中克服了这个问题。