我在Spring Boot中收到来自发布/订阅服务的响应:
public void messageReceiver(Message<String> msg) {
LOGGER.info(String.valueOf(msg.getHeaders()));
}
是回应:
ReceiverController :
{app=232323, id=1111111111,
gcp_pubsub_original_message=PushedAcknowledgeablePubsubMessage
{projectId='xxx', subscriptionName='xxx', message=data: "MESSAGE TEXT"
attributes {
key: "app"
value: "232323"
}
message_id: "33333333333333"
publish_time {
seconds: 1500000008
nanos: 200000000
}
}, timestamp=1593892177777}
如何接收属性值以进行进一步处理?
attributes {
key: "app"
value: "232323"
}