Using the AQ adapter to consume messages from the database