Consumers Explained

Administration -> Consumers

What exactly is this page for?

I mean I kinda know but at the same time there’s a lot of magic going on behind the scenes when I click one of these buttons.

For instance; my history got stale so I went here and click on the “Reset Event Consumer” icon for “HistoryService” and then my latest history appeared for my blog posts.

I still kinda don’t like doing that because I’ve no idea what’s going on and in case of a failure I’ve no idea what to do next.

I’d really appreciate a sentence or two about the usage and best practices of these features.

Thanks!

PS. Is there a way to avoid having your history getting stale? Or I must come here from time to time to refresh the “cache”?

PPS2: I ran HistoryService 10 mins ago and it’s still running. Is this normal? I’ve got about 15 apps in my Squidex instance if that factors in?

Squidex uses event sourcing, so everything that happens in the system is recorded as an event, almost everything.

For example there is an event like

  • AppCreated
  • ContentCreated
  • ContentUpdated

and so on.

EventConsumer listen to events in the system and run their thing, for example the history service populates the history collection, the rules system creates jobs for the rules system and so on.

They run forever basically and in the newest version they also restart automatically, but in case of an error they might just stop.

There is a special endpoint to get the health of these background systems: https://cloud.squidex.io/background-healthz You can use a monitoring service to create alerts when the system is not healthy.

Thanks for giving some more insight!

As an editor or administrator… when can these functions on the “Consumers” page come in handy? Can you give some real life scenarios when one might want to click “Reset Event Consumer”?

Thanks again.

In some rare situations the text indexer is not able to recover, e.g. when the indexes are corrupt. Then you can restart it.

1 Like