ForTopic
ForTopic<T>
ForTopic<T>Creates a topic for which there can be multiple queue subscriptions. This enables a 'fan out' scenario.
A topic and queue pair will be created for message of type
T, with a subscription attaching the topic to the queue.The topic and queue names will be determined using the supplied (or default if not)
ITopicNamingConventionandIQueueNamingConvention, applied to the message typeT.These conventions can be overridden on a case-by-case basis using
WithNamein the topic configuration.
A dead letter queue will be created, named after the queue name above with an
_errorsuffix.
Example:
x.ForTopic<OrderReadyEvent>();This describes the following infrastructure:
An SQS queue of name
orderreadyeventAn SQS queue of name
orderreadyevent_errorAn SNS topic of name
orderreadyeventAn SNS topic subscription on topic
orderreadyeventand queueorderreadyevent
Further configuration options can be defined by passing a configuration lambda to the ForTopic method.
Last updated
Was this helpful?