We can use like below fn :
-- application.yaml
spring:
cloud:
function:
definition: mySupplier
stream:
poller:
fixed-delay: 5000
bindings:
mySupplier-in-0:
destination: test-q
group: nonexclusive
mySupplier-out-0:
destination: test/topic/abc
-- code
@Bean
Supplier<Message<String>> mySupplier(){
return () -> {
return MessageBuilder.withPayload("Welcome to solace world!").setHeader("solace_timeToLive", 13000L).build();
};
}