简体   繁体   中英

PubSub subscription filter

I'm trying to set filters in the PubSub subscriptions, one is to order the attributes in the message and the other to add quotes to attributes key and value something like "key":"value" . Is this possible?

Thanks in advance

Filters cannot change messages, including attribute order or attribute contents. The filters only allow one to set match criteria for attributes such that only messages that match those criteria are delivered to the subscribers. The attributes in a messages are a map from a string key to a value string, not a list. Therefore, there can be no guarantees on the ordering of the attributes. Many languages these days randomize the order when iterating through a map so one does not depend on the order in such data structures.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM