SplitR is a lightweight library based on Spring Boot that helps microservices communicate effectively using the Request-Response pattern over Kafka. This tool allows your services to perform synchronous, typed queries, even when they are spread out across different locations. It prioritizes both speed and reliability, making it an excellent choice for distributed systems.
To start using SplitR, follow these steps:
pom.xml file and add SplitR as a dependency:<dependency>
<groupId>com.example</groupId>
<artifactId>splitr</artifactId>
<version>1.0</version>
</dependency>
spring:
kafka:
bootstrap-servers: localhost:9092
consumer:
group-id: your-group-id
producer:
acks: all
@Autowired
private SplitRService splitRService;
public ResponseType makeRequest(RequestType request) {
return splitRService.executeRequest(request);
}
Imagine you have two microservices: one for user authentication and another for data processing. Using SplitR, the authentication service can send a query to the data processing service. SplitR will handle the communication, ensuring that both services work together without hassle. You simply call the executeRequest method, and SplitR takes care of the rest.
For more details, explore our detailed documentation. It covers installation tips, configuration options, and advanced usage scenarios.
If you need help or want to join discussions, come to our community forum. You can ask questions, share experiences, or even contribute to the project.
To keep up with the latest features and updates, consider following the project. We regularly add improvements based on user feedback.
If you encounter issues, here are a few common problems and solutions:
pom.xml.You are now ready to download and use SplitR in your applications! It simplifies communication between microservices, making your development process smoother.