I am using InboundChannelAdapter to fetch data from a database every 100000 miliseconds.
@InboundChannelAdapter(value = "inboundChannel", poller = @Poller(fixedDelay="100000",maxMessagesPerPoll = "10000"))
Following by a transformer where I transform the fetched data into a json .
@Transformer(inputChannel = "inboundChannel" , outputChannel = "outChannel")
public Message<String> transformer(Message<List<MyOb>> items)
When I run the code, looks like fixedDelay
is totally ignored (doesnt wait 100000 milis ) if maxMessagesPerPoll
defined!
if I remove maxMessagesPerPoll
it works.
In table i have only 2 rows.
CodePudding user response:
Looks like there is some misunderstanding with that maxMessagesPerPoll
. It indeed has meaning for a single poll cycle . By default it is really 1
, so, that’s how you see a delay for your two messages polled in two different cycles. Since you h m have much more than 2 for that property, it is not a surprise that you don’t see a delay .