Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating asynchronous events in spring

I was looking at using spring 3.1 for publishing events and using listeners to consume these events. however I have read that these events are synchronous, is it possible to make them asynchronous, maybe use the @async annotation?

Im really looking at creating an event driven architecture in Java/Spring - publishing and consuming events, would you think Spring/Java would suffice?

like image 910
user1555190 Avatar asked Mar 12 '26 21:03

user1555190


1 Answers

In this case it will be perfect to use Spring integration. which gives a different kinds of messaging solutions.

Here is a little explanation about Event-Driven Consumer:

And here is an example in Spring integration that is relevant to your needs:

  1. Messaging Endpoints
  2. some more examples

Good luck!

like image 56
Tomer Avatar answered Mar 15 '26 10:03

Tomer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!