Hi Claus
Oh, yes, that makes everything more easy!
Thank you so much for your super quick response and your great help!!!
By the way: I love Camel (not the cigarette). Thanks for that great product!
Reto
-Original Message-
From: Claus Ibsen
Sent: Friday, 11 August 2023 23:13
To: users
On Fri, Aug 11, 2023 at 5:08 PM Reto Peter wrote:
> Hi Claus
>
> You mean I should just change my executeQuery route this way, from dynamic
> to static?
>
> OLD
> from("direct:executeQuery")
> .toD("sql:${header.sqlquery}")
>
> NEW
> from("direct:executeQuery")
> .setHeader("CamelSqlQuery", simpl
Hi Claus
You mean I should just change my executeQuery route this way, from dynamic to
static?
OLD
from("direct:executeQuery")
.toD("sql:${header.sqlquery}")
NEW
from("direct:executeQuery")
.setHeader("CamelSqlQuery", simple("${header.sqlquery}"
.to("sql:SELECT")
Correct?
But the bean class do
Hi
Its much better to use a header with the dynamic query
(key = SqlConstants.SQL_QUERY)
https://camel.apache.org/components/3.21.x/sql-component.html#_message_headers
and use a static "to" endpoint then you dont have the overhead of creating
a new endpoint/producer per SQL query combination.
Hi Claus
Thanks for fast response.
The call is to an SQL query:
result = producer.requestBodyAndHeader("direct:executeQuery", "", "sqlquery",
query);
and the route looks like this:
from("direct:executeQuery")
.routeId("Execute resolvement query")
.toD("sql:${header.sqlquery}")
;
-Original M
What endpoint do you send to with the producer template
On Fri, Aug 11, 2023 at 4:15 PM Reto Peter wrote:
> Hi
>
> I got an issue with the ProducerTemplate used inside a bean
> The Bean class called Resolvement.class injects the ProducerTemplate as
> follows:
>
>
> @EndpointInject
>
> private Pr
Hi
I got an issue with the ProducerTemplate used inside a bean
The Bean class called Resolvement.class injects the ProducerTemplate as follows:
@EndpointInject
private ProducerTemplate producer;
inside the bean resolve() method, I do then use this producer like this:
producer.requestBodyAndHe
Was able to resolve this, thanks for your input.
On Thu, Aug 10, 2023 at 5:11 PM Kushagra Bindal
wrote:
>
> Do you have any handy sample with you which I can refer to for this case?
>
> On Thu, Aug 10, 2023 at 2:34 PM Claus Ibsen wrote:
> >
> > Hi
> >
> > Read the javadoc of those methods what t