episerver / content-events-masstransit

Apache License 2.0
4 stars 0 forks source link

Event provider doesn't work once installed RabbitMQ locally #7

Closed lonvepi closed 2 years ago

lonvepi commented 2 years ago

Pre-con: Have two sites, one site in my local computer (#1) and one in VM (#2), installed following:

  1. Install Erlang (ver 24.2.1) & RabbitMQ (ver 3.9.13) with Admin rights on both site
  2. Install EPiServer.Events.MassTransit 1.0.0--pre-42
  3. Config site following this guide: https://github.com/episerver/content-events-masstransit
  4. Both sites connect to the same azure sql database Steps to reproduce:
    1. CMS #1, navigate to a page in View mode.
    2. CMS #2, go to Edit view and navigate to the same page as in step 1.
    3. CMS #2, add/edit/delete some text on the page and click Publish.
    4. CMS #1, refresh the page Expected result: Page is updated to latest changes in step 3. Actual result: Content is cache, page is still showing old content, not updating content like changes in step #3. Event provider doesn't work Note:
    5. It WORKED FINE if using rabbitmq instance externally (https://customer.cloudamqp.com/instance) ex: amqps://colnfxim:NFM-OC_GE_uC04G-nZ9dHVjj0hgV7PHB@dingo.rmq.cloudamqp.com/colnfxim
    6. I checked Node is running in both sites by using "rabbitmqctl.bat start_app" cmd. I also accessed the RabbitMQ Management Plugin – Dashboard (http://localhost:15672/)
lonvepi commented 2 years ago

Here is my config for event provider in appsettings.json file "CMS": { "MassTransitEventProvider": { "ConnectionString": "amqp://guest:guest@localhost:5672", "ExchangeName": "optimizely.fanout.siteevents" } } It worked fine if using Rabbit instance externally "CMS": { "MassTransitEventProvider": { "ConnectionString": "amqps://colnfxim:NFM-OC_GE_uC04G-nZ9dHVjj0hgV7PHB@dingo.rmq.cloudamqp.com/colnfxim", "ExchangeName": "optimizely.fanout.siteevents" } }

breizh22 commented 2 years ago

I have exactly the same problem.

lunchin commented 2 years ago

The queue needs to be accessible from both servers. If you are running on localhost both servers cannot access rabbitmq

breizh22 commented 2 years ago

I'm running everything locally. Both sites that share the same db and rabbitmq.

lonvepi commented 2 years ago

@breizh22 me too. Everything is installed and running locally. But it doesn't work Please re-check it @lunchin Thanks

lunchin commented 2 years ago

I just was trying to recreate this without luck. I am able to have have events fire on localhost rabbitmq.

lunchin commented 2 years ago

Closing this tested on a number of different machines locally and it worked.