field type is a struct. In this case it is supposed to be
val
. Typically this simplifies accessing the contents of the field. If you need to rewrite the entire aggregate field value, something like this should help:
Discovered that the memory scope needs to be widened. The contentType C string ptr needs to be allocated in the publishMessage function, and passed through as a parameter to the setupAmqpProperties function, instead of allocating the C string ptr in the setupAmqpProperties function.