简体   繁体   中英

Message and RabbitMQ for microservices in ABP framework

I'm currently working on the microservices with the ABP framework and I want to implement RabbitMQ to achieve internal communications between distributed services. I would talk about the things I have done and the issue I cannot solve.

I firstly made two projects that LA and LB using abp new LA -t app --no-ui . They are running at different port, which are localhost:5001 and localhost:5002. I followed the instruction to configure RabbitMQ and add some lines (So sorry to not write my code directly here, because it's formatting is so strange) to appsetting.json in LA.Web folder. The changes for LAWebModule.cs in LA.Web is shown as . Here is the PriceChangeEto placed in Application.Contracts folder. PublishAsync() and DistributedEventHandler are in the App service class in Application. I want to create an interface that trigger the event first and then those services subscribing to the event could handle the event to update information stored in AggregateRoot entity via EF Core.

When I open the RabbitMQ management page (localhost:15672) and they are successfully connected. RabbitMQ Management Page showed that the published event by PublishAsync() are unacked.

So My questions are

  1. why there is unacked for PublishAsync(), the execution for that method responsed with Http 204.
  2. If the event was triggered, the EventHandler should update book price, but it's not.

Could anyone help me with it please and what should I do next in order to achieve the implementaion of RabbitMQ in Abp framework. Thanks in advance.

you can mark this as solution to close this question this has been fixed in https://github.com/abpframework/abp/issues/7104

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM