6

I have 2 spring boot applications and I need to communicate between these two applications. I have rest template to communicate. Any other techniques to communicate other than rest template?

3 Answers3

7

This question has nothing to do with Springboot per se. Question here is how should two applications(web or non web) communicate with each other.

With respect to communication, it's again depends on the requirement, whether you need Synchronous communication or Asynchronous communication.

If its Synchronous communication(where you wait for the result, and client is blocked), you use Rest Template
If its Asynchronous communication(where you don't want to wait for result and client is not blocked), you use Message Brokers like ActiveMq, Kafka etc....

pvpkiran
  • 25,582
  • 8
  • 87
  • 134
2

If you are using Spring in your application you might wanna try Spring Integration. Spring Integration is a spring module that helps integrating two systems together.

Spring Integration extends the Spring programming model to support the well-known Enterprise Integration Patterns. Spring Integration enables lightweight messaging within Spring-based applications and supports integration with external systems via declarative adapters.


You also have Apache camel at your disposal. Check out more details here.

Apache Camel is an open source Java framework that focuses on making integration easier and more accessible to developers. It does this by providing:

  • concrete implementations of all the widely used Enterprise Integration Patterns (EIPs)
  • connectivity to a great variety of transports and APIs
  • easy to use Domain Specific Languages (DSLs) to wire EIPs and transports together
Community
  • 1
  • 1
Abdullah Khan
  • 12,010
  • 6
  • 65
  • 78