Re: Spring to Camel properties documentation

2020-12-10 Thread Jared Whiklo

Well played Zoran, well played.

Ok as I wait for IntelliJ to finish digesting Camel I have two follow-up 
questions


1. Digging in some more, perhaps this is more my expectations.

I am using a @Configuration class with @PropertySources.

In my RouteBuilder I have some existing @PropertyInject variables and 
those seem to get the correct values from the aforementioned 
@Configuration class.


But Simple language interpretation of properties is not getting the 
values from the Spring class.


So this:

@PropertyInject(value ="reindexer.port")
private int restPortNum;

returns the expected value from the the properties file loaded in the 
configuration class.


But

.to("xslt:{{xslt.path}}/FOXML.xslt?transformerFactory=#xsltTransformer")

results in

.to("xslt:classpath:/FOXML.xslt?transformerFactory=#xsltTransformer")

instead of the expected

.to("xslt:file:/tmp/FOXML.xslt?transformerFactory=#xsltTransformer")

Using Spring Boot means it auto-configures a property parser and my own 
causes a conflict.


I can use @PropertyInject to inject all the properties and then rewrite 
the above as


.to("xslt:" + XSLT_PATH + "/FOXML.xslt?transformerFactory=#xsltTransformer")

but I wanted to check that I was not missing something obvious.

**
2.  Is there documentation on how to test the adoc production (I've 
never used adoc before) so I don't make ugly pages edits?


cheers,
jared

On 2020-12-10 12:12 p.m., Zoran Regvart wrote:

Hi Jared,
thanks for bringing this to our attention, I'm sure that we have more
of these issues throughout the documentation.

I'm looking at the old source[1] of documentation and for whatever
reason the formatting is broken there, so that could be the reason why
when we migrated the page over to Asciidoc that didn't carry over.

Seems to point to snippets in
CamelSpringPropertyPlaceholderConfigurerTest.xml[2].

I wonder if you can see if that makes sense and update the
documentation to fix this, there's a "Edit this page" link top right,
that'll take you directly to the source editor on GitHub to create a
pull request. The syntax to include a snippet via tags should look
like this[3].

Thanks :)

zoran

[1] https://cwiki.apache.org/confluence/display/CAMEL/Properties
[2] 
https://github.com/apache/camel/blob/master/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml
[3] 
https://github.com/apache/camel/blob/master/docs/user-manual/modules/ROOT/pages/testing.adoc#L81-L84

On Thu, Dec 10, 2020 at 6:11 PM Jared Whiklo  wrote:

Hi,

I'm learning how to use Camel in a Spring Boot environment and have most
everything working except properties.

I was looking at the explanation for bridging the two here

https://camel.apache.org/components/latest/properties-component.html#_bridging_spring_and_camel_property_placeholders

It says:

  > To bridge Spring and Camel you must define a single bean as shown below:

but then doesn't actually have the example. Perhaps I misunderstood the
text, but could someone give me an example of the required bean?

cheers,
jared

--
Jared Whiklo
jwhi...@gmail.com





--
Jared Whiklo
jwhi...@gmail.com




OpenPGP_signature
Description: OpenPGP digital signature


Re: Spring to Camel properties documentation

2020-12-10 Thread Zoran Regvart
Hi Jared,
thanks for bringing this to our attention, I'm sure that we have more
of these issues throughout the documentation.

I'm looking at the old source[1] of documentation and for whatever
reason the formatting is broken there, so that could be the reason why
when we migrated the page over to Asciidoc that didn't carry over.

Seems to point to snippets in
CamelSpringPropertyPlaceholderConfigurerTest.xml[2].

I wonder if you can see if that makes sense and update the
documentation to fix this, there's a "Edit this page" link top right,
that'll take you directly to the source editor on GitHub to create a
pull request. The syntax to include a snippet via tags should look
like this[3].

Thanks :)

zoran

[1] https://cwiki.apache.org/confluence/display/CAMEL/Properties
[2] 
https://github.com/apache/camel/blob/master/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml
[3] 
https://github.com/apache/camel/blob/master/docs/user-manual/modules/ROOT/pages/testing.adoc#L81-L84

On Thu, Dec 10, 2020 at 6:11 PM Jared Whiklo  wrote:
>
> Hi,
>
> I'm learning how to use Camel in a Spring Boot environment and have most
> everything working except properties.
>
> I was looking at the explanation for bridging the two here
>
> https://camel.apache.org/components/latest/properties-component.html#_bridging_spring_and_camel_property_placeholders
>
> It says:
>
>  > To bridge Spring and Camel you must define a single bean as shown below:
>
> but then doesn't actually have the example. Perhaps I misunderstood the
> text, but could someone give me an example of the required bean?
>
> cheers,
> jared
>
> --
> Jared Whiklo
> jwhi...@gmail.com
>
>


-- 
Zoran Regvart


Spring to Camel properties documentation

2020-12-10 Thread Jared Whiklo

Hi,

I'm learning how to use Camel in a Spring Boot environment and have most 
everything working except properties.


I was looking at the explanation for bridging the two here

https://camel.apache.org/components/latest/properties-component.html#_bridging_spring_and_camel_property_placeholders

It says:

> To bridge Spring and Camel you must define a single bean as shown below:

but then doesn't actually have the example. Perhaps I misunderstood the 
text, but could someone give me an example of the required bean?


cheers,
jared

--
Jared Whiklo
jwhi...@gmail.com




OpenPGP_signature
Description: OpenPGP digital signature


Re: How to produce messages to Azure SQL DB in Camel

2020-12-10 Thread Omar Al-Safi
Hi,

To write your events to your target Azure SQL server database, you can
use Camel
JDBC 
component since Azure SQL supports JDBC uses JDBC driver to connect to the
database.
Plus Camel Debezium SQL Server, I'd recommend using something like Azure
Eventhub as event messaging medium in order to retain the events for some
period of time in case of failures .. etc, hence your pipeline may look
like this:
Azure SQL DB (live) -> Camel Debezium SQL Server -> Azure Eventhub -> Camel
JDBC -> Azure SQL DB (replication).

There are few examples that can help you to get started:

   - Debezium with AWS Kinesis and Cassandra Example
   

   .
   - Debezium with Azure Eventhubs with Azure Storage Blob Example.
   

   - Camel JDBC Example
   

   .

I hope it helps!

Regards,
Omar

On Thu, Dec 10, 2020 at 8:47 AM SRIKANT MVS  wrote:

> Team,
> I have a usecase where I need to replicate data for a specific duration
> from one Azure SQL DB (subscription1) to another Azure SQL DB
> (supbscription2).
>
> The source DB has live data with continuous inserts, updates and deletes
> possibility. Henceforth, we will miss the updates while performing DB copy
> operations.
>
> For consuming the messages, I am considering to use Debizium SQL Server
> Connector
> <
> https://camel.apache.org/components/latest/debezium-sqlserver-component.html
> >,
> but this component
>
> *supports only the consumer functionality*
>
> Which camel component can I use to produce the same event to the
> destination DB ??
>
> -Srikant
>