0
votes

Writing an azure function to consume event hub messages and writing to the azure cache for Redis. Not able to find a solution for following

  1. consuming messages from the event hub continuously (there is binding available but not sure to integrate with azure cache for Redis )
  2. is there any straight trigger for both event hub and azure cache for redis integration
1

1 Answers

1
votes

At this moment, there's no input/output binding to Azure Redis Cache (you can monitor this request in here), you'll need to add the nuget packages and add / update / remove keys and values yourself.

Here's the full list of input / output bindings:

https://docs.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files

As another option, you can use Cosmos DB as your caching service too, more info:

https://github.com/Azure/Microsoft.Extensions.Caching.Cosmos

https://medium.com/@marcodesanctis2/using-azure-cosmos-db-as-your-persistent-geo-replicated-distributed-cache-b381ad80f8a0

https://dzone.com/articles/how-to-use-caching-with-azure-cosmos-db

EDIT: I've found a non-official way using Azure Functions Custom Binding. You can give it a try, but as I said, it's not official:

https://github.com/fbeltrao/AzureFunctionExtensions#examples