Skip to content

Spring Cloud Stream Consumers not detected #684

@rafaelzig

Description

@rafaelzig

Describe the bug
In the context of Spring Cloud Function Support, Springwolf does not automatically detect consumer beans declared with @Component annotation instead of @Bean.

Dependencies and versions used

  • springwolf-cloud-stream:1.1.0
  • springwolf-ui:1.1.0'

Code example
This works:

@Configuration
@Log4j2
public class MyConsumerConfiguration {
  @Bean
  public Consumer<String> myConsumer() {
    return log::info;
  }
}

But this does not work:

@Component
@Log4j2
public class MyConsumer implements Consumer<String> {
  @Override
  public void accept(String payload) {
    log.info(payload);
  }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions