aspnetrun / run-aspnetcore-microservices

Microservices on .Net platforms which used ASP.NET Web API, Docker, RabbitMQ, MassTransit, Grpc, Yarp API Gateway, PostgreSQL, Redis, SQLite, SqlServer, Marten, Entity Framework Core, CQRS, MediatR, DDD, Vertical and Clean Architecture implementation with using latest features of .NET 8 and C# 12
https://www.udemy.com/course/microservices-architecture-and-implementation-on-dotnet/?couponCode=JUNE24
MIT License
2.53k stars 1.38k forks source link

RabbitMQ exchange type is fanout #17

Open mehmetozkaya opened 3 years ago

mehmetozkaya commented 3 years ago

Even we are using topic exchange model which is pub/sub pattern implementation. It seems fanout on RabbitMQ when send basketcheckout event to queue in the RabbitMQ Dashboard. Need to investigate - udemy -128

plamenkoyovchev commented 3 years ago

Hi Mehmet, do you have some update on this issue ? I'm struggling to find out why the exchange type is fanout when I've explicitly set it to be Direct exchange.

ofaruksahintr commented 3 years ago

Hi all,

Everything looks ok. All exchange type is set to fanout default on Masstransit. You have to override them, If you need to change them. messages --> EventBus.Messages.Events:BasketCheckoutEvent --> basketcheckout-queue --> basketcheckout-queue

What's your plan? topic or direct and whats the routing key ?

You can take a look at this; In Publisher (Basket.Api): cfg.Publish<BasketCheckoutEvent>(c => { c.ExchangeType = "direct"; })

In Subs (Ordering.Api): c.Bind<BasketCheckoutEvent>(c => { c.ExchangeType = "direct"; })

*BTW I didn't watch the course.

mehmetozkaya commented 3 years ago

Thanks for sharing this. we will set a topic exchange model so I will set the exchangetype as a topic.