Azure / AzureCacheForRedis

Repository to share Tools, Patterns, Samples, and track issues
MIT License
10 stars 10 forks source link

AzureRedisEvents is not published when simulating failover (via Reboot) #7

Closed arabelaa closed 2 years ago

arabelaa commented 2 years ago

I followed the steps provided https://github.com/Azure/AzureCacheForRedis/blob/main/AzureRedisEvents.md and subscribed to AzureRedisEvents channel to better handle failover events.

I simulated a planned failover event via Reboot option (as mentioned https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/azure-cache-for-redis/cache-failover.md#explanation-of-a-failover) but no event was published on the mentioned channel.

Is there a way to simulate a planned maintenance event? Is the event published only for premium tier?

It would be extremely helpful to have a way to validate/test that AzureRedisEvents are published in case of failover/maintenance events.

philon-msft commented 2 years ago

Hi @arabelaa, rebooting nodes should publish a notification on all cache SKUs. Is your client app able to receive other pub/sub messages?

arabelaa commented 2 years ago

It seems I am not able to receive any published messages. Which is strange because in console when psusbscribe AzureRedisEvents I am able to see the events when Reboot happens. I am using StackExchange.Redis andPrimary connection string (StackExchange.Redis) to subscribe to events.

I think there is something wrong in my setup.

I figured out the issue. I was using a custom ChannelPrefix when creating the multiplexer.

Thanks for helping out.

philon-msft commented 2 years ago

@arabelaa, good to hear that it's working for you now. Thanks for posting the solution!