Hibernate search coordination strategy. Can we intercept the event creating process in order to define priority order of events?

Sure :smiley:, let me reiterate … events in the outbox event table do not have a priority … so you cannot put one event to get processed before the other. In other words:

Can we intercept the event creating process in order to define priority order of events?

no, not at the moment.

You could start a conditional massindexer (Hibernate Search 7.2.2.Final: Reference Documentation) to index your “main” entity, since massindexing will pause the processing of events (Hibernate Search 7.2.2.Final: Reference Documentation). But I wouldn’t consider that an elegant solution :smiley:

also, what would you do if 20000 users go and update main entities and you get 20000 events in the queue anyway… I don’t know much about your use cases, but I’d consider adjusting the user expectations …

See also: