Working on message bus subscriptions options
-
concurrent dictionary per topic that has a channel of messages.
-
publish sends a message to the channel based on the topic for the message
-
by default the message type full name is the topic (1 topic per message type)
-
message publish topics can be overridden to publish multiple message types to a single topic
-
subscription specifies a topic which can have wildcards
-
in memory subscription will check all of the topics and add all of the matching topics
-
to the subscription object
-
for rabbit impl, on subscribe will ensure all exchanges are created for the message types that are being listened for
-
publish will ensure the topic the message is going to is created
-
queue groups can be specified on subscriptions and if multiple subscribers use the same queue group, they will round robin the messages
-
subscriptions have their own channel instances
-
read from topic channel, write to all matching subscriber channels which in turn call the message handlers with their instances
-
when writing to a subscriber channel and there is more than one matching subscriber, then all subscribers get a copy of the message
-
if multiple subscribers have the same queue group name then we round robin them
-
https://deniskyashif.com/2019/12/08/csharp-channels-part-1/
-
https://github.com/deniskyashif/trydotnet-channels