Hi,
I have used the JdbcChannelMessageStore and it does use the database as a queue.
What I really want is to back a queue channel with a table only for the sake of disaster recovery. What I mean by that is :
a. When a message is put on the queue, I want it stored in the table
b. When the message is consumed, I want it removed from the table
c. When the queue channel is initialized, I want to load all channel+region specific messages in the table (that were left in there because the application crashed) into the queue.

I do not see the need to query the table every time a message is consumed from the queue. This is an expensive operation given the locking complexity.
So I have 2 questions:
1. Why does the current implementation query the database instead of just getting the message off the in-memory queue and then deleting it from the table?
2. How can I avoid polling the table using the provided interfaces?
Regards,
Hari.