MassTransit with Azure Service Bus topic subscription

183 views Asked by At

I have a consumer in MassTransit and it seems like it wants to listen for messages on a queue as default. It creates a topic with a subscription, and a queue. Messages are forwarded from the subscription to the queue.

How can I configure it to work directly with the subscription?

1

There are 1 answers

1
Chris Patterson On BEST ANSWER

If you only want to use a subscription, you will need to manually configure the subscription.

cfg.SubscriptionEndpoint<MessageType>("subscription-name", e =>
{
    e.ConfigureConsumer<MyConsumer>(context);
})