Questions tagged [camel-jdbc]

Camel component for database access through jdbc api

This is an component camel-jdbc that allow to execute operation using api.

17 questions
9
votes
1 answer

Apache Camel SQL Batch insertion taking long time

I am using Apache Camel SQL batch insertion process. My application is reading tickets from the Active MQ which contains around 2000 tickets. I have updated the batch as 100. The query which i am firing is as follows: sql.subs.insertCdr= insert…
KayV
  • 12,987
  • 11
  • 98
  • 148
4
votes
2 answers

Apache Camel JDBC Polling and Idempotency

I'm building a simple camel route that should continuously poll a table and push data into ActiveMQ. Each poll should only pull data not previously pulled. The best way I can think of to do this is to keep track of the last successfully processed…
Mark Murfin
  • 776
  • 8
  • 19
2
votes
1 answer

How to enable multiple datasource in camel jdbc endpoint?

I want to enable camel load balancer for multiple datasource. Any one please let me how to enable multiple datasource in camel jdbc endpoint. Thanks in advance!! Here is my code. Creating multiple datasource in defaultcamelcontext. …
asr
  • 51
  • 4
1
vote
0 answers

Camel Split/RecipientList Threads & Transaction Boundaries

In Apache Camel 2.20.2, I created a route with a split() and recipientlist(). I would like the entire route and recipients of each Exchange to occur in the same transaction. I am confused about when Camel will use a separate thread and transaction…
1
vote
1 answer

Camel-JPA: No option to send a command message to the JPA component (like in JDBC comopnent)

In the Camel-JDBC component, we can send a select statement as a body to the jdbc endpoint, which returns the results. Below sample code is from the Camel-JDBC website: from("direct:projects") .setHeader("lic", constant("ASF")) …
ndsurendra
  • 413
  • 1
  • 5
  • 15
1
vote
1 answer

Camel - camel-sql batch insert using useMessageBodyForSql

I read in the documentation here that "If batch is set to true, then the interpretation of the inbound message body changes slightly – instead of an iterator of parameters, the component expects an iterator that contains the parameter iterators; the…
DKIT
  • 3,471
  • 2
  • 20
  • 24
1
vote
2 answers

How to use Camel JDBC component without Timer

I am doing Apache Camel PoC in my project. I am stuck at one issue when using Camel JDBC component. I can read from the database with JDBC component. But I need to use Timer component always. As per the Camel documentation JDBC component cannot be…
ParagJ
  • 1,566
  • 10
  • 38
  • 56
0
votes
0 answers

How to print final SQL query in Camel-Jdbc which uses Spring JDBCTemplate

Given and Issue: I have Spring boot application. Requirement is we need to print SQL query in Camel-Jdbc which uses Spring JDBCTemplate internally.
Sharad
  • 370
  • 3
  • 7
0
votes
0 answers

Why is Camel JDBC so slow compare to Java JDBC? (1 Sec vs 4 Minutes)

I am using camel jdbc in place of simple java jdbc code just to fetch 10,200 records Java JDBC: Connection c = dataSource.getConnection(); Statement m = c.createStatement(); ResultSet rs = m.executeQuery(getEmployeeCall()); …
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

Package not found when create data source using camel

I tried to replicate the same example given in the following question. import javax.sql.DataSource; import org.apache.camel.main.Main; import org.apache.camel.builder.RouteBuilder; import org.apache.commons.dbcp.BasicDataSource; public class…
Subramanian
  • 67
  • 1
  • 10
0
votes
1 answer

How to wait for an Apache Camel JDBC job to finish

I have a loop in my code that generates apache camel flows. However, each of these jobs needs to Poll from an Oracle database, and it leads to a Maximum Number of Sessions per user error. The reason is that these jobs are async, thus cause the app…
orezvani
  • 3,595
  • 8
  • 43
  • 57
0
votes
1 answer

camel jdbc and outputClass option

I want to read from DB and create a CSV file. In order to do that I am using camel-jdbc and camel-bindy. First I set the body with the SELECT statement. SELECT [vendor], [ean], [itemid] AS itemId, [quantity] FROM…
Themis Pyrgiotis
  • 876
  • 5
  • 15
0
votes
2 answers

Camel isMockEndpointsAndSkip doesn't skip jdbc endpoint

I have a route that end on a jdbc endpoint: from(CONNECTOR).routeId(ROUTE_ID).process(createSelectStatement).to(jdbc); The jdbc Endpoint is created this way: public static final String DB_NAME = "db"; private void setupJdbcEndpoint() { …
dermoritz
  • 12,519
  • 25
  • 97
  • 185
0
votes
1 answer

camel jdbc out of memory exception

I am trying to ingest data from postgres to another DB and I am using camel-jdbc component to do it. I have a large table so I want to read few rows at a time instead of the whole table altogether. so my route looks like below (only for testing…
Pri
  • 11
  • 4
1
2