It isn't clear from the docs how to output a structured message. In an old function I've used BrokeredMessage, and the docs say to use Message for V2 functions, however there is no guidance on how to use this. Is this correct:
[FunctionName(nameof(Job))]
public static async Task<IActionResult> Job(
// ...
IAsyncCollector<Microsoft.Azure.ServiceBus.Message> serializedJobCollector
)
The goal is to be able to set some metadata properties like the ID, which I've done before (with V1 and BrokeredMessage) for duplicate detection, but I'm not sure if this is correct or I need to serialize to a string or what...