Search code examples
c#asp.netasp.net-corerabbitmqmasstransit

How to ignore namespace on Masstransit publishing


I use RabbitMQ and Masstransit for messaging. I have 2 applications in asp.net core. One of them is ConsumerApp, another is ProducerApp. They have no shared model project, each project has its own Models. For example, each of them has Order model, they are same. When I send message from ProducerApp, it becomes as ProducerApp.Models:Order, so I can not consume it, because Order model of Consumer named as ConsumerApp.Models:Order. How can I ignore namespace ?


Solution

  • You can't, it's clearly defined in the documentation that the full type name, including namespace, is used to consume messages.

    This is essentially a duplicate of this question and this one.