Home > OS >  Using Java functional API with Spring Cloud Data Flow and Polled Consumers
Using Java functional API with Spring Cloud Data Flow and Polled Consumers

Time:11-09

I am working on a project that is trying to use the polled consumer API. However, existing documentation, blog posts and sample code seems to use deprecated annotations (such as org.springframework.cloud.stream.annotation.Input). This seems to be because they are relying on the older style of Spring Cloud stream applications rather than using Java functional api (e.g., java.util.function.Function), as shown in other examples such as this one, given in the same repo.

Is there a way to use functional style with polled consumers in Spring Cloud Stream?

CodePudding user response:

You are using outdated documentation. The most current is available from the project site - https://spring.io/projects/spring-cloud-stream#learn.

The section you are looking for is - https://docs.spring.io/spring-cloud-stream/docs/3.1.5/reference/html/spring-cloud-stream.html#spring-cloud-streams-overview-using-polled-consumers

  • Related