Questions tagged [camel-sql]

82 questions
0
votes
1 answer

Camel - catch SQL exception and try 3 times

Which exception is thrown when Camel route toF("sql:insert into ...") fails due to db connection issue? I've try to capture like onException(CannotCreateTransactionException.class, ConnectionException.class) but it's not capturing. If i can capture…
Julia
  • 133
  • 11
0
votes
1 answer

How to BULK Read from Azure SQL server and BULK INSERT to Cassandra in Camel

I want to read 5+ million events from an Azure SQL DB table and perform a BULK INSERT to Cassandra. The table has 2 columns. I see the SQL component available for reading from Azure SQL DB.…
0
votes
1 answer

How to store a global value with query results and reuse it to enrich every message

I'm trying to implement a simple streaming pipeline: Get list of users from a remote REST endpoint, spliting the list into individual messages For each user I have to enrich it with information from a SQL parametric table (departments),…
codependent
  • 23,193
  • 31
  • 166
  • 308
0
votes
1 answer

Apache Camel: Is creating multiple Routes costly operation?

Following is just requirement: Read from DB Create 3 files from data with only small setter addition on if statement Deliever 3 to same sftp Coding: 1 Route Timer which to(direct) 1 Route trigger which call same (direct) 1 ROUTE - from(direct)…
fatherazrael
  • 5,511
  • 16
  • 71
  • 155
0
votes
2 answers

Is there any component available in Camel to run standalone route?

I want a child route to run from a Timer route but the following code is not running properly: Child route: from("direct:processOrder").id("dd") // .setBody(constant("select * from customer")) // .to("jdbc:testdb") .to("sql:select * from…
fatherazrael
  • 5,511
  • 16
  • 71
  • 155
0
votes
1 answer

camel-sql issue (different sql server versions)

I have a basic camel route (running in karaf) this route returns a list of ID's from a SQL table, when connected to a SQL server 2012 the route works as expected, Route: private static final String GET_PRODUCTS_QUERY = "select…
CamelUser
  • 31
  • 5
0
votes
1 answer

Camel Rest to dB Query, returning incorrect response

I am trying to receive a xml message from a rest call, then make a call to the db, map each row into an object and then return the complete marshalled object as the rest response. However my db query result is being returned as the rest response…
0
votes
1 answer

camel-sql consumer DB connection issue

I am using Apache Camel with Spring boot. I am using my spring boot app as jar without any server. In app I am having a Camel-SQL consumer route with delay of 1000. This consumer then further calls other route which use splitter and parallel…
gomzee
  • 103
  • 1
  • 9
0
votes
0 answers

camel-sql consumer poll new records in each batch issue

In my code I have a camel-sql consumer which runs on default consumer.delay=500 and Max msg per poll is 5. Consumer is fetching data from Customer table with Join on Customer_status table (Customer.Cust_id = Customer_status.Cust_id where…
gomzee
  • 103
  • 1
  • 9
0
votes
1 answer

Apache Camel sql-component Fail to convert to internal representation

When I use sql-compenent to retrieve records from database as Map is OK. But, when I define a outputClass like this:
Alisson Gomes
  • 1,029
  • 14
  • 30
0
votes
2 answers

Accessing camel body contents to load SQL statement dynamically - org.apache.camel.RuntimeCamelException

camel-sql 2.22.1 In my route I have: from("direct:targetDatabase").startupOrder(1) .process(new Processor() { public void process(Exchange exchange) throws Exception { …
xindi
  • 27
  • 6
0
votes
1 answer

Camel Endpoint URI using sql containing date range

I specified an endpoint containing a URI for a sql component as: I am setting startDate and endDate as headers. In that case I…
ThaisK
  • 365
  • 1
  • 4
  • 22
0
votes
2 answers

Sql Component :Consume multiple rows and mark them all as processed using onConsume

I configured camel sql component to read data from from database table . I have "onConsume" parameter working when i read one row at a time , but doesn't work when i try to read multiple rows at a time using "maxMessagesPerPoll". Here is what i…
rohith
  • 733
  • 4
  • 10
  • 24
0
votes
1 answer

ResultSet caching in Spring-boot Camel SQL

I have implemented a Spring-boot Camel batch application running every 5 mins which is using camel-sql component to query some data from table. I am using java DSL implementation and configuring my routing endpoints inside RouteBuilder.configure.…
Girish007
  • 442
  • 6
  • 26
0
votes
0 answers

Camel SQL Insert From Select

I am using camel spring dsl to insert data into the database. This is the code I am using: camel:to uri= "sql:INSERT INTO SOME_TABLE(COL1,COL2) SELECT A.COL1,B.COL2 FROM A,B WHERE SOME_CONDITION"?dataSource="SOME_DataSource" I am not getting…
Sarang
  • 422
  • 5
  • 11