You can also use the ICollector interface in place of IAsyncCollector if you would like to store multiple messages synchronously.
Note that you might have to install Azure Storage Extensions so that you can add output bindings if you've not done so already. In Azure Functions V2 runtime, adding extensions to each of the services (storage, in this case) is mandatory.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.