We have a spring web application that is responsible for 2 services with different endpoints. One is for query and one is for notification((like localhost:8080/query and localhost:8080/notification)).
The problem is, when QUERY web service received too many requests, the system slows down, which also affects the notifications web service. It also slows down.
Is there a way to separate their thread pools in order to prevent them from affecting one another by configuring spring?
Query web service
@Endpoint
@Service
public class RnQueryServiceEndpoint{
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "RNQueryRequest")
@ResponsePayload
RNQueryServiceResponse rNQueryServiceRequest(@RequestPayload ProttonRNQueryRequest rNQueryRequest, MessageContext messageContext){
... some business logic here
}
}
Notification Web Service
@Endpoint
@Service
public class NotificationServiceEndpoint {
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "NotificationRequest")
@ResponsePayload
NotificationResponse serveNotificationRequest(@RequestPayload NotificationRequest notificationRequest) {
.... some business logic here
}
}