Describe the feature
Per message options configuration for SQS/SNS messages when using IMessagPublisher.
Use Case
To support FIFO queues where there is sufficient detail in the message to determine the group/deduplication id's. Having the configuration at bootstrap abstracts the FIFO logic/requirement away from the code that publishes the message.
Proposed Solution
Add optional configuration actions to IMessageBusBuilder.AddSQSPublisher and IMessageBusBuilder.AddSNSPublisher for MessageRoutingPublisher to pre-populate SQSOptions/SNSOptions before handing off to the specialised publishers.
builder.Services.AddAWSMessageBus(builder =>
{
builder.AddSQSPublisher<TransactionInfo>(
"https://sqs.us-west-2.amazonaws.com/012345678910/MyFifoQueue.fifo",
configureOptions: (message, options) =>
{
options.MessageGroupId = message.TransactionId;
options.MessageDeduplicationId = message.TransactionId;
});
builder.AddSNSPublisher<BidInfo>(
"arn:aws:sns:us-west-2:012345678910:MyFifoTopic.fifo",
configureOptions: (message, options) =>
{
options.MessageGroupId = message.BidId;
options.MessageDeduplicationId = message.BidId;
});
});
Other Information
Configuration supported by code configuration only.
Acknowledgements
AWS.Messaging (or related) package versions
AWS.Messaging
Targeted .NET Platform
Operating System and version
Describe the feature
Per message options configuration for SQS/SNS messages when using
IMessagPublisher.Use Case
To support FIFO queues where there is sufficient detail in the message to determine the group/deduplication id's. Having the configuration at bootstrap abstracts the FIFO logic/requirement away from the code that publishes the message.
Proposed Solution
Add optional configuration actions to
IMessageBusBuilder.AddSQSPublisherandIMessageBusBuilder.AddSNSPublisherforMessageRoutingPublisherto pre-populateSQSOptions/SNSOptionsbefore handing off to the specialised publishers.Other Information
Configuration supported by code configuration only.
Acknowledgements
AWS.Messaging (or related) package versions
AWS.Messaging
Targeted .NET Platform
Operating System and version