I was created one poller which will execute every one second and call some method to perform action but sometimes i am getting "Channel application.bischannel has 0 subscriber(s)" exception.
Here i am attaching my code:
@Component
public class BISPoller {
@Autowired
private BisAPIService bisApiService;
@InboundChannelAdapter(channel="bischannel",poller = @Poller(fixedDelay = "1000"))
public String billingTransactionEventPoller() {
bisApiService.performBillingTransactionEvent();
return "Bill Transaction Event Execution Completed";
}
@ServiceActivator(inputChannel = "bischannel")
public void handle(String in) {
//Logger method
}
}
Let me know how to resolve issue.