If Masstransit schedules an event with Quartz and Rabbitmq, it there a way I can see it?
I am trying to solve a production problem. I am debugging a program that uses MassTransit which then uses RabbitMq and Quartz. It seems that the code uses 'eventScheduler.SchedulePublish' to correctly schedule the event, but then on production the associated consumer is not called at the scheduled moment.
Is there a way to see whether the event arrives in its to be scheduled container. Is there a way to see a list of the events that are scheduled for the future moments? I tried to look in RabbitMq Management but I am not sure where to check for what.
The scheduler is initiated with:
services.AddMassTransit(opt => { opt.AddMessageScheduler(schedulerEndpoint); .... })
And then the event is eventually pushed via:
await eventScheduler.SchedulePublish<T>(this.DeliveryTime.Value, Event, cancellationToken);
Solution 1:
You'll need to find which service is running the actual Quartz service, and identify the database it uses. Then you should be able to dig into the Quartz database schema to identify any scheduled messages.
There should be a consumer on the queue for the scheduler address specified in whatever schedulerEndpoint is specifying. You should see that connection in the RabbitMQ management console, which may give you an idea as to which host/process is running the Quartz service.
Beyond that, understanding the database schema for Quartz is something you can likely Google to understand, but the schema is on GitHub.