Open ashovlin opened 8 months ago
We used to have a feature like 1 in JustSaying, where we would publish one message to two regions as part of a (with hindsight over-complicated) disaster recovery scenario, hence used to.
At first sight, 2 feels counter intuitive as to how the MS DI container works by default i.e. last one wins.
If those were the only two options, 1 feels like the least surprising to me.
What you may need here, is to think bigger than messages. Conceptually 'messages' can be used as commands or events. Commands are sent to a destination to perform an action. There's always 1-1 mapping between the sender/recipient of a command. Events on the other hand signal an event that has already happened and can be sent to multiple recipients. The mapping between publisher of an event to subscribers are 1-many. Admittedly AWS messaging may not be the right abstraction to build this, but need to make it so that this is possible.
@HEskandari I would expect the the 1 to many scenario be handled in the configuration of the AWS resources. For example if you need multiple consumers then the endpoint of the message type should be an SNS topic or EventBridge which can fan out the publishing of the message. It doesn't seem worth it to have the application logic itself hand the dispatching of the message to multiple endpoints.
Thanks for the feedback so far, we're going to leave this open for at least a few months longer to see if folks are still looking for 1-to-many support.
Describe the feature
Currently for configuration like the following:
When sending a
ChatMessage
, the framework will send it toQueueA
because it happened to be registered first.https://github.com/awslabs/aws-dotnet-messaging/blob/db7703ff5eb4a17c7450ee55713b41c7cac2fc4a/src/AWS.Messaging/Configuration/MessageConfiguration.cs#L21
We're looking feedback on:
QueueA
andQueueB
?LogWarning
explaining the precedence.