0

I have a Springboot application with spring-cloud-function.

The implementation is of type Consumer

With spring boot 2.1.5.RELEASE and spring-cloud-dependencies Greenwich.SR6 , on calling the rest api , the application returns 200 response code.

After upgrading the spring boot version to 2.2.13.RELEASE and its higher version and spring-cloud-dependencies to Hoxton.SR5 and its higher versions 2020.0.3 / 2021.0.3 , the api is now returning 202 response code .

How is this happening ?

Code snippet

public class CustomClass implements Consumer<Message<String>> {
public void accept(Message<String> body) {
     //operation
  }
}
Jaiprasad
  • 149
  • 11
  • 202 is "Accepted" meaning its received the request and is processing it, but hasn't finished. So is the new release doing things asynchronously by default? Have you checked the release notes. – gbjbaanb Jul 04 '23 at 17:57
  • I see from the documentation from spring-cloud-function 3.x onwards the response code is 202 for POST type for path /{consumer} – Jaiprasad Jul 04 '23 at 18:17
  • we are operating with spring-cloud-function version 2.0.2 where the expected response code is 200 , can we safely move with 202 response when we migrate from 2.0.2 to 3.x/4.x version ? – Jaiprasad Jul 04 '23 at 18:19
  • You are using unsupported version of s-c-function and s-c-cloud. Also your question doesn't have enough information for us to go by Please read this https://stackoverflow.com/help/how-to-ask – Oleg Zhurakousky Jul 06 '23 at 14:16

0 Answers0