Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8570649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:36:23+00:00 2026-06-11T18:36:23+00:00

I have to select some rows from table, send the result to a queue

  • 0

I have to select some rows from table, send the result to a queue and then the same records as ‘Sent’ in the DB.
This how I am trying to do this but not sure how to pass a column value to the where clause of the update query for the each record of the select query.

<route> 
 <from uri="timer://kickoff?period=10000"/>
     <setBody>
       <constant>select top 10 * from tableName</constant>
     </setBody>
 <to uri="jdbc:test"/>
 <multicast>
        <to uri="activemq:queue:TESTQUEUE"/>
        <setBody>
            <constant>update tableName set status='Sent' where primaryKey= ${primaryKey}</constant>
        </setBody>
    <to uri="jdbc:test"/>
 </multicast>
</route>

Will this route will run for all 10 records?

If it is not possible with JDBC/SQL component then how to achieve it with Hibernate component?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:36:24+00:00Added an answer on June 11, 2026 at 6:36 pm

    When you run a query using Camel JDBC, you will get back an ArrayList of HashMaps. See the camel documentation here:

    http://camel.apache.org/jdbc.html

    “The result is returned in the OUT body as an ArrayList>. The List object contains the list of rows and the Map objects contain each row with the String key as the column name.”

    You will need to setup a spring bean to process this body. You can extract your primary key from the arraylist in the spring bean and set a header. From there you can use the splitter to process all the rows:

    http://camel.apache.org/splitter.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have users table and want to SELECT some rows by bitmask criteria. I'll
I have this JDBC SQL query: select * from table where TX_DATE = {d
I have a table with 3 columns (A,B,C). I want to select some rows
I have some code that grabs some rows from a table and I want
I have multiple threads that are processing rows from the same table that is
so in my database some rows have NULL values, and when I select *
I have the query to select some columns from two tables, which must contain
I have the problem, that MSSQL Server 2000 should select some distinct values from
Suppose i have 1kk records in my database. Now i need to select some
I have to delete about 10K rows from a table that has more than

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.