int-jdbc:inbound-channel-adapter channel depth

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


int-jdbc:inbound-channel-adapter channel depth



if the configured channel in int-jdbc:inbound-channel-adapter is full,after that polling happens or not ?
Can I use a queue channel in int-jdbc:inbound-channel-adapter?
My requirement is that if the channel is full,no DB call should make ,until channel is free.




1 Answer
1



You need to use a QueueChannel with restricted capacity. As far as any Inbound Channel Adapter uses a MessagingTemplate with the sendTimeout = -1, the QueueChannel performs a put() operation on the underlying LinkedBlockingQueue:


QueueChannel


MessagingTemplate


sendTimeout = -1


QueueChannel


put()


LinkedBlockingQueue


/**
* Inserts the specified element at the tail of this queue, waiting if
* necessary for space to become available.
*
* @throws InterruptedException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
public void put(E e) throws InterruptedException {



To ensure that the poller is blocked until space is available you should use a fixed-delay option do not allow any parallel calls to DB.


fixed-delay



So, in other words so far so good as long as you use default options.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived