@Marijn ,
Thanks for reaching out to Q&A.
As you have mentioned, the message metadata ( messaging-specific types) is not yet supported in the Isolated function and is only available with in-process functions. So for a Isolated process, I would suggest you to continue using the duplicate detection enabled service bus queue and pass a custom message id to the message.
Sample JSON message:
{
"Id": "69da1afa-a61a-4a8e-921d-ad8263679d4c",
"Message": "Test message",
"CreatedDate": "2022-02-15T18:14:24.8770000+07:00"
}
The message id can be retrieved by the function app by reading the string message (myQueueItem in below example)
public static void Run([ServiceBusTrigger("session-queue", Connection = "constring")] string myQueueItem, FunctionContext context)
{
var logger = context.GetLogger("Function1");
logger.LogInformation($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
//split the message id
string[] s=myQueueItem.Split(',');
logger.LogInformation(s[0]);
//your logic based on message id
}
I hope this helps!
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.