Currently, subscriptions topics seem to be determined by the GraphQL API. Controllers filter messages published to the GraphQL API-determined topic. This does not scale well in certain situations.
Consider a chatroom server, where users may create rooms and subscribe to those rooms, passing the room id as a parameter. Then by the example, the publisher must publish to ALL chatrooms, and the subscription controller filters by chatroom. This is not ideal in, say, redis implementations, since publishing is O(n) in the number of topic subscribers. The ideal way is to be able to determine which topic to subscribe to as controller. (As well as implement a filtering function)
Currently, subscriptions topics seem to be determined by the GraphQL API. Controllers filter messages published to the GraphQL API-determined topic. This does not scale well in certain situations.
Consider a chatroom server, where users may create rooms and subscribe to those rooms, passing the room id as a parameter. Then by the example, the publisher must publish to ALL chatrooms, and the subscription controller filters by chatroom. This is not ideal in, say, redis implementations, since publishing is O(n) in the number of topic subscribers. The ideal way is to be able to determine which topic to subscribe to as controller. (As well as implement a filtering function)