dotnet / dotnet/AspNetCore.Docs
Add precision about wildcard (*) + Redis SignalR Backplane = Pattern based subscriptions
- Dominant language
- C#
- Stars
- 13.1k
- Forks
- 24.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 97
Description
**When the group name contains wildcard, Redis backplane behavior changes and switch to pattern based subscription**
**This behavior is undocumented (neither in MS code or in this page) and should be :)**
If you check here:
https://github.com/StackExchange/StackExchange.Redis/blob/ae6419a164600b4b54dd7ce8a699efe8e98d8f1c/src/StackExchange.Redis/RedisSubscriber.cs#L162
You see that the behavior (`SUBSCRIBE` vs `PSUBSCRIBE`) changes depending on `IsPatternBased`
Which itself depends upon the Channel mode:
https://github.com/StackExchange/StackExchange.Redis/blob/ae6419a164600b4b54dd7ce8a699efe8e98d8f1c/src/StackExchange.Redis/RedisChannel.cs#L43
Which in the case of Redis backplane is left unset (=Auto)
There does not seem to be a way to override this behavior with a backplane setting.
This happened to me, so I did a very basic escaping to resolve this issue (`groupName.Replace("*", "§")`)
**Maybe it would be a good idea to also have a setting and set it to false by default** (the wildcard behavior might be desired in some cases, but probably just biting some users like me...)
Thank you
---
#### Document Details
⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*
* ID: c548355c-d88f-b941-0622-56732973123b
* Version Independent ID: bddd7575-422d-4342-af48-f6b0979fb69a
* Content: [Redis backplane for ASP.NET Core SignalR scale-out](https://learn.microsoft.com/en-gb/aspnet/core/signalr/redis-backplane?view=aspnetcore-7.0)
* Content Source: [aspnetcore/signalr/redis-backplane.md](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/signalr/redis-backplane.md)
* Product: **aspnet-core**
* Technology: **aspnetcore-signalr**
* GitHub Login: @bradygaster
* Microsoft Alias: **bradyg**
Contributor guide
Assessment
This issue has not been assessed yet.