Is there a built in “transactional” mechanism when polling rows and updating?
@InboundChannelAdapter(value = "inbound", poller = @Poller(fixedDelay = "${delay") )
public MessageSource<?> inbound() {
JdbcPollingChannelAdapter adapter = ;
adapter.setUpdateSql("Update ...");
return adapter;
}
@Bean
@ServiceActivator(inputChannel = "inbound")
public MessageHandler handler() {
return message -> {
foo(messages);
};
}
If anything fails (in the handler()
) I would like to rollback the Update
.
And another question:
What is the difference setting maxMessagesPerPoll
on the poller
annotation and setting adapter.setMaxRows( )
?