You should consider the PSUBSCRIBE command in redis.
With PSUBSCRIBE clients subscribes to a pattern instead of a single key.
You can easily encode the hierarchy in the key naming (say you have topics:A:B:C), when a client subscribes to topics:A:* it will receive messages published on topics:A:B and topics:A:B:C