Ashish Jagga
Ashish Jagga

Reputation: 189

difference between synchronous and Asynchronous ways of event processing in hybris

Can somebody please explain the difference between synchronous and Asynchronous ways of event processing in hybris platform?

I was just going through event system provided by hybris service layer and got stuck at this concept as I couldn't proceed without knowing exactly what happens during events processing (synchronous or asynchronous )? In face what does the term "event processing" ?

Upvotes: 0

Views: 3448

Answers (1)

Denis Zevakhin
Denis Zevakhin

Reputation: 624

Hybris's Event System is based on the Spring Event System, and provide an EventService and wrappers for Events and EventListeners (AbstractEvent and AbstractEventListener). So, under the hood, you deal with Spring's ApplicationEvent and ApplicationListener.

The goal of "event processing" is to provide a pass-through functionality between platform components, in the way, when "interested" components subscribe for an events, and receive notifications when certain event occured (published).

Hybris allow events to be published in a clustered environment, between cluster nodes, by implementing ClusterAwareEvent interface. These events are processed asynchronously. All other events processed synchronously, but it is possible to publish them asynchronously too, by overriding spring definition of PlatformClusterEventSender bean, with injection of thread pool.

Upvotes: 4

Related Questions