+
+ // Extract policy id type : for now we assume exactly 1 plugin maps to each policy type
+ rapidjson::Pointer policy_type_ref("/policy_type_id");
+ rapidjson::Document doc;
+ if (doc.Parse(message).HasParseError()){
+ mdclog_write(MDCLOG_ERR, "Error: %s, %d :: Could not decode A1 JSON message %s\n", __FILE__, __LINE__, message);
+ return;
+ }
+ rapidjson::Value * ref = policy_type_ref.Get(doc);
+ if (ref == NULL){
+ mdclog_write(MDCLOG_ERR, "Error : %s, %d:: Could not extract policy type id from %s\n", __FILE__, __LINE__, message);
+ return;
+ }
+ int policy_type_id = ref->GetInt();
+
+ auto it = plugin_rmr_map.find(policy_type_id);