No there’s only a string so you’d need to either send the payload as base64 or do something like send a key that references a byte value that subscribers download themselves as would be the optimal strategy for sending large payloads.
They’re not large, rather there’s many, many small ones. The back and forth from byte array to UTF8 creates problems in that it’s not reversible, for example - the following breaks on round trip
Unfortunately, I’m not the sole user of this Redis database, and my role is rather limited. The other people using it are not even using .NET, they’re using C on Linux. Their idea is to pull the bytes, and do something like this:
Assuming the other users won’t go along with the Base64 paradigm, that’s why I was wondering if there should be Action<string, byte[]> OnMessageBytes or if I’ll need to handle RedisNativeClient to get the bytes.
Yes, excellent point. I hate that Redis calls the data type a string when it can be used to transfer non-string bytes. But anyway, this change is working beautifully well, much appreciated!