Thanks for the reply.
It’a a good idea and one I considered.
I can infer a structure from the subject however there’s >200 subjects/message types that are passed and transformed through the app. The app is a little lightweight transformer that sits between a couple of larger applications and allows the output of one application to be used in a number of downstream app or saves to file system. There are a restricted set of field ids mapping to a type across all these message types (< 10) so it seemed better (initially at least) not to template each message but to put in a map[string]interface{} and use the ID to infer type. It’s a bad output from a legacy system we’re using go to help address.
I don’t need to process all the fields currently - only really the CSV and bool fields (used for conditional routing) however I’d like to build a solution that was extensible if the requirements change (e.g we may have to transform the string field to remove backticks at some point in the future).