Spring cloud stream support solace
Give the autogenerated binding a friendlier name
spring.cloud.stream.function.bindings.supplyLoan-out-0=output
what would be the equivalent of this in solace configuration ?
===================================================
Supplier loanSupplier = () -> {
Loan loan = new Loan(UUID.randomUUID().toString(),
names.get(new Random().nextInt(names.size())),
amounts.get(new Random().nextInt(amounts.size())));
log.info("{} {} for ${} for {}", loan.getStatus(), loan.getUuid(), loan.getAmount(), loan.getName());
return loan; };
Does this supplier triggers event on application startup or we need to call it using the queue because if we call it then same message will go to listener as well how to trigger it ?
Answers
-
Hi @akg17 - apologies, somehow this got missed.
When this Supplier function (non-reactive) is used in a Spring Cloud Stream application, it will use a default poller provided by Spring Cloud Stream that will trigger the supplier every second by default.
You can also inject this Supplier bean into your application and call the get method programmatically. It is a manual action.
Hope this helps.
0