Re: How to programmatically reset an application property?

2021-08-24 Thread Ron Cecchini
nd start again. It will take a time. Is it a thing > you really need? > > Any way you can put all needed properties in class fields to make them change. > ___ > Best wishes,Vyacheslav. > > Ron Cecchini 24 августа 2021 г. 07:53:29 написал: > > > I'm using Camel + S

How to programmatically reset an application property?

2021-08-23 Thread Ron Cecchini
I'm using Camel + Spring Boot. In my application.properties, I set a property 'foo.bar.size' In my routes, I use: {{foo.bar.size}} In some Java processor code, I use: camelContext.resolvePropertyPlaceholders("{{foo.bar.size}}") I now need to reset that property in some Java code and have it

Re: Is Camel's Kafka component auto-decompressing Snappy byte[] ?

2021-07-26 Thread Ron Cecchini
{ MyObject obj = e.getIn().getBody(MyObject.class); [...] Anyway Thanks, Camel. It's all quite simple... once I know what I'm doing. > On 07/22/2021 8:07 PM Ron Cecchini wrote: > > > Hi, all. > > There is a non-Camel producer that takes a Java object and seri

Is Camel's Kafka component auto-decompressing Snappy byte[] ?

2021-07-22 Thread Ron Cecchini
Hi, all. There is a non-Camel producer that takes a Java object and serializes & Snappy-compresses it and writes it directly to a Kafka topic. I have a Camel-based consumer which is trying to take the raw byte[] off the Kafka topic and pass it to a custom method that does both the Snappy

NoRouteToHostException - Address not available

2021-05-30 Thread Ron Cecchini
Hi, guys. This might not be a Camel-specific error at all, but given that we only see this in one of my Camel + Spring Boot apps I thought it might be worth a shot to ask. If not a Camel or Spring issue, maybe it's an OpenShift issue others have seen? I'm in a RHEL environment, using Camel

How would you parallelize this?

2021-02-11 Thread Ron Cecchini
Hi, everyone. Say you have 2 vectors of integers, V1 and V2, of size M and N, resp. The core of the processing is to pair each element of V1 with each element V2 and call a web service with the 2 integers. So, M x N calls to a web service. I have routes that look like the following

Looking for full stack project examples that use Camel

2020-11-19 Thread Ron Cecchini
Hi everyone. I don't want to start off-topic threads here to ask general software architecture questions (even if they do involve Camel and Spring Boot). Instead, if I can look at some working examples on GitHub/GitLab, how the code is laid out, etc, that would be very useful. Feel free to

Re: Asynchronously calling a route

2020-08-31 Thread Ron Cecchini
ng out where my brain cramp is... > On 08/28/2020 2:36 PM Ron Cecchini wrote: > > > Hi, guys. I've been following the "async" docs and examples and the few code > snippets I could find online, but I'm still having trouble doing something > that I would think is

Async and asyncCallbackRequestBody()

2020-08-28 Thread Ron Cecchini
Hi, guys. I've been following the "async" docs and examples and the few code snippets I could find online, but I'm still having trouble doing something that I would think is very common. My use case is basically this: 1. I have a small route (call it "experiment") that hits an HTTP endpoint

Enabling global CORS support

2020-08-06 Thread Ron Cecchini
Hi, guys. I have a Camel (3.4.2) + Spring Boot (2.3.1.RELEASE) web service using Undertow. I ran into my first CORS (cross-origin resource sharing) issue, googled around, and solved it with @CrossOrigin. My question has to do with why I could *not* solve it with

Custom splitter

2020-07-09 Thread Ron Cecchini
Hi, all. Since the list is quiet I thought I'd run something by you. I wrote a custom splitter that's working just fine, so I really don't need any help. But I was curious if I could have done things simpler with some combination of split(), tokenize() and Simple, etc.? ~~~ I hit an

Re: custom component vs. sending to a route

2020-06-25 Thread Ron Cecchini
of Camel > https://camel.apache.org/manual/latest/pojo-producing.html > > > On Sun, Jun 21, 2020 at 11:41 PM Ron Cecchini wrote: > > > > Hi guys. I have to integrate a 3rd party’s message listener code into my > > routes. Their API is pretty simple: > > > &

custom component vs. sending to a route

2020-06-21 Thread Ron Cecchini
Hi guys. I have to integrate a 3rd party’s message listener code into my routes. Their API is pretty simple: listener(“foo”, fooHandler()); creates a listener using the underlying configured JMS and calls fooHandler() whenever it sees a “foo“ message. Instead of creating a full-blown

Re: How to copy an exchange property to the global options?

2020-05-01 Thread Ron Cecchini
evaluated > during routing of an exchange as they are not intended for that. > > But if you want to do it anyway, then your process method can store > the body size as a value instead of a simple text. > > Something ala .put("xxx", exchange.getMessage.getBody.size) > >

Re: How to copy an exchange property to the global options?

2020-04-30 Thread Ron Cecchini
p.s. While I'm at it, is there a way to *access* a GlobalOption from inside a route using Simple? > On May 1, 2020 at 12:24 AM Ron Cecchini wrote: > > > I'm trying to pass back the # of things I've processed in a route back to the > calling Java. > > This log() displa

How to copy an exchange property to the global options?

2020-04-30 Thread Ron Cecchini
I'm trying to pass back the # of things I've processed in a route back to the calling Java. This log() displays the correct number: .log(LoggingLevel.INFO, "Processing ${body.size} Things ...") I then tried putting that ${body.size} in a GlobalOption on the CamelContext so I can access it

Re: (Spring Boot) Stuffing fat jars & run-time route startup

2020-04-29 Thread Ron Cecchini
atch. I was like, "If I can just get the user's params to *that* part of the pipeline, it will all work out nicely..." And now it does. Yay. Thank you, Spring & Camel. > On April 28, 2020 at 6:28 PM Ron Cecchini wrote: > > > Hi, gang. I hope you’re all doing well

(Spring Boot) Stuffing fat jars & run-time route startup

2020-04-28 Thread Ron Cecchini
Hi, gang. I hope you’re all doing well. Two questions if I could. TL;DR: (so you can decide now if you want to hit since this is long...) 1. How to add a resource file from a Maven parent to a child’s fat (Spring Boot) JAR? 2. How to parse command line args and have the main() call

Re: Camel + Drill + Parquet

2020-02-12 Thread Ron Cecchini
arquet format. > However, we do have an open feature request > <https://issues.apache.org/jira/browse/CAMEL-13573> to add parquet data > format, we would love to see some contributions to add this to Camel :) . > > Regards, > Omar > > > On Tue, Feb 11, 2020 at 11:37

Camel + Drill + Parquet

2020-02-11 Thread Ron Cecchini
Hi, all. I'm just looking for quick guidance or confirmation that I'm going in the right direction here: - There's a small Kotlin service that uses Camel to read from Kafka and write to Mongo. - I need to replace Mongo with Apache Drill and write Parquet files to the file system. (I know

HTTP proxy problem

2020-01-24 Thread Ron Cecchini
Hi, all. I have previously successfully used the HTTP component with proxy info to poll a site. Bu now I'm running into a "connection reset" problem when polling another site that has a slightly different connection strategy. The HTTP configuration

Re: Need both camel-kafka-starter & camel-kafka in Spring Boot app?

2020-01-13 Thread Ron Cecchini
hat ought to bring in > > the needed JARs. > > > > On Fri, Jan 10, 2020 at 7:44 PM Ron Cecchini > > wrote: > >> Does it make sense that I would need both camel-kafka-starter and > >> camel-kafka in my Camel 3.0 / Spring Boot 2.2.1 app? > &g

Need both camel-kafka-starter & camel-kafka in Spring Boot app?

2020-01-10 Thread Ron Cecchini
Does it make sense that I would need both camel-kafka-starter and camel-kafka in my Camel 3.0 / Spring Boot 2.2.1 app? I thought the *-starter would be enough, but without the camel-kafka dependency my Kafka consumer throws a: java.lang.NoClassDefFoundError:

What is the default Log EIP log name?

2019-12-30 Thread Ron Cecchini
TL;DR: I'm trying to use a single logger for both my routes (i.e. the Log EIP) and in my components. In my routes, I would like the displayed log name to be the Route ID, and in the components it should be the class name. Ok, it's about time I solved this one once and for all... I create my

Re: Communicating a value between a route and the RouteBuilder class

2019-12-12 Thread Ron Cecchini
> On December 12, 2019 at 11:16 AM Claus Ibsen wrote: > > You can also name your RouteBuilder class with a bean id, if you use > spring / spring-boot or cdi etc. And then refer to this bean ids, > where you can have methods that you can refer to in the simple bean > function. Then you dont need

Re: Communicating a value between a route and the RouteBuilder class

2019-12-12 Thread Ron Cecchini
can use bean function in the simple language ${bean:xxx} to refer > to a bean by its id, then you can store your offset cache with some > bean id. > > On Thu, Dec 12, 2019 at 7:08 AM Ron Cecchini wrote: > > > > The use case is simply this: I need to poll and hit an HTTP e

Communicating a value between a route and the RouteBuilder class

2019-12-11 Thread Ron Cecchini
The use case is simply this: I need to poll and hit an HTTP endpoint with an initial "offset" param of -1. The response header contains a new offset ("NEXT_OFFSET") to use the next time I hit the endpoint. Sounds simple enough... Until you start trying to do it... playing around with

Re: Configuring Jackson for java.time

2019-12-04 Thread Ron Cecchini
//github.com/FasterXML/jackson-modules-java8 > > Jackson JSON data format has a `objectMapper`[2] property that you can > use to set the customized ObjectMapper. > > zoran > > [2] https://camel.apache.org/components/latest/json-jackson-dataformat.html > > On Mon, Dec

Re: [ANNOUNCEMENT] Apache Camel 3.0.0 Released

2019-12-01 Thread Ron Cecchini
] I finally hit on a temporary workaround - going back to using a java.util.Date instead of a java.time.OffsetDateTime - and it again all works great with Camel 3.0. But eventually I'll probably need to figure out how to use the newer Java date/times. Thanks for reading this far and helping me figure out where

Re: [ANNOUNCEMENT] Apache Camel 3.0.0 Released

2019-11-28 Thread Ron Cecchini
Christmas has come early! There's so much new stuff I'm not even sure what I should be excited about at the moment - but I'm excited! Thank you for all your efforts, guys! (and now I can spend pre-Thanksgiving feasting working through the Migration and eliminating the run-time crashes...) >

Re: Camel and Swagger API *client* code

2019-11-20 Thread Ron Cecchini
at brings you new > adventures too ;) > > > On Sat, Nov 9, 2019 at 7:37 AM Ron Cecchini wrote: > > > > Hi, Claus. Thanks for your response. > > > > The Camel "rest-swagger" looks awesome but unfortunately I don't think I > > can use it, becaus

Re: Camel and Swagger API *client* code

2019-11-08 Thread Ron Cecchini
i > > Maybe something like the rest-swagger component > https://camel.apache.org/components/latest/rest-swagger-component.html > > However this is for Camel to call an existing REST service by > referring to the swagger api of the service. > > On Fri, Nov 8, 2019 at 10:17 PM Ron Cecchi

Camel and Swagger API *client* code

2019-11-08 Thread Ron Cecchini
I'm taking a shot here... I'm new to Swagger. I see that Camel has integration for generating Swagger APIs. But what about *reading* someone else's API and using their schemas in my routes? I'm looking at Swagger Codegen to see how to generate the client code... But given Camel's infinite

Pipelining : Camel routes vs. Microservice architecture

2019-10-28 Thread Ron Cecchini
Hey, guys. It's kinda quiet here so I thought I'd ask for some thoughts... I recently got put on a relatively small project that's nicely utilizing a microservices architecture. There are about 8-10 services and they're using Kafka. The whole thing is about 10k lines of Kotlin, and they do

One CamelContext vs. multiple CamelContexts

2019-09-27 Thread Ron Cecchini
TL;DR: 1 CamelContext with 100 Routes vs. 100 CamelContexts each with 1 Route Say I need to ingest data from a hundred sensors or data sources, over TCP or JMS, and get it written to a central database or JMS. The messages are asynchronous and don't require a response or any processing. We

Spring configuring a bean

2019-08-26 Thread Ron Cecchini
I apologize ahead of time, because I feel like I've taken a few steps backward and am now hung up on a simple newbie issue regarding application properties and Spring configuring beans. Backstory: I've now created about a dozen Camel projects, all reusing the same basic "architecture" I set up

Re: How to unmarshal when you don't know what you're unmarshalling?

2019-06-26 Thread Ron Cecchini
t; On June 25, 2019 at 11:24 PM Claus Ibsen wrote: > > > Hi > > For null body, see this FAQ > http://camel.apache.org/why-is-my-message-body-empty.html > > On Tue, Jun 25, 2019 at 10:24 PM Ron Cecchini wrote: > > > > > > Sweet Baby Jesus, I got it

RE: How to unmarshal when you don't know what you're unmarshalling?

2019-06-25 Thread Ron Cecchini
rocessor > and setting a header or property of the type. Then you can use a choice to > basically route to the correct unmarshal code. You can use String find, or > regex if you want to do this and keep the body intact, then you can unmarshal > the way you do below. > > >

Re: How to unmarshal when you don't know what you're unmarshalling?

2019-06-25 Thread Ron Cecchini
to have to come up with some other trick to hang on to the body - so that I can reset the body - so that I can attempt the 2nd unmarshal. Wish me luck > On June 25, 2019 at 9:50 AM Michael Davis wrote: > > > Can you get the sender to specify which type of file it is using a pa

How to unmarshal when you don't know what you're unmarshalling?

2019-06-21 Thread Ron Cecchini
Hey, all. I have a route that's sitting on a port and it can receive 1 of 2 different XML messages. I was simply going to try to unmarshal with the first one, and if it errors, unmarshal with the next one. But is there a smarter or best practices way to handle this? Thanks.

Camel + Spring Boot as a backend?

2019-04-16 Thread Ron Cecchini
Hi, all. If/when anyone has any time, I was hoping to get a few quick opinions. (and I do mean be brief; I don't want anyone wasting time on this.) *** Could Camel + Spring Boot *alone* be used to implement the Java portion of *** a simple backend for a low-throughput, non-realtime system that

Re: AW: [DISCUSS] - Apache Camel 3 - A new tagline

2019-02-20 Thread Ron Cecchini
(This is the graphic I was trying to send yesterday. Please excuse the horrendous ASCII "art" !) Infinite Integration! _ oo / ' |Java = Camel '_/ 1 > However with the new modern world of containers I came up with: > > * Apache Camel 3 - A full-stack integration

Re: [DISCUSS] - Apache Camel 3 - A new tagline

2019-02-19 Thread Ron Cecchini
I'm not gonna lie, I don't like anything that comes after "integration framework" ... I still consider myself a newbie (to Camel), but I like Trilok Agarwal's idea to focus on what Camel is really known for (at least to this newbie) and does really well - simplifying integration. In fact,

Re: Camel & MongoDB guidance

2019-02-08 Thread Ron Cecchini
> I was just looking for some Camel-specific design guidance / feedback Yeah, sorry about that long post... I just needed to slug through it for 2 more days. (Always the best way to learn.) In the end, I came up with a clean, concise, elegant solution once I learned .multicast() and the

Camel & MongoDB guidance

2019-02-05 Thread Ron Cecchini
Hi, guys. This isn't a burning emergency. I was just looking for some Camel-specific design guidance / feedback if anyone has any. I'm also really new to Mongo, so I have some questions about it that aren't specific to Camel. As usual, my actual question is relatively short, but I spend a

Re: Feedback on Deprecating the Camel Maven Archetypes

2018-11-28 Thread Ron Cecchini
I don't know if you wanted comments here or on the ticket, but I'll just quickly say: I have made extensive use of the 'camel-archetype-spring-boot' and love it (and Camel) to pieces. > On November 28, 2018 at 12:21 PM Claus Ibsen wrote: > The Camel team is considering deprecating the Camel

Re: Problem with netty4:udp and udpByteArrayCodec=true

2018-11-11 Thread Ron Cecchini
will lead to issues with binary > data. > > What you want (I think) is > `.to("netty4:udp://host:port?allowDefaultCodec=false=true")` > without `convertBodyTo` > > zoran > > > On Fri, Nov 9, 2018 at 6:12 AM, Ron Cecchini wrote: > > > > First,

Problem with netty4:udp and udpByteArrayCodec=true

2018-11-08 Thread Ron Cecchini
First, a couple of thank yous several weeks in the making: Thank you to Claus (as always) for help regarding replacing camel-rabbitmq with a custom class. Indeed, I only needed to do a write. So using 'to("bean:myBean?method=process)' worked perfectly. Thank you to Zoran for advice on

Timing problem of Spring Injection vs. Component Scan?

2018-10-11 Thread Ron Cecchini
Hi, all. I have a Camel/Spring Boot app created from the camel-spring-boot archetype. I've set up my several Processor and RouteBuilder classes with @Component and have essentially avoided resources/spring/camel-context.xml. I'm now trying to incorporate a new class which has its own Spring

Re: Help with Splitter/Aggregator-like behavior

2018-09-28 Thread Ron Cecchini
effectively ended in RouteBuilder } public void buildAndWrite (Exchange exchange) throws ParseException { if ( producerTemplate == null ) producerTemplate = exchange.getContext().createProducerTemplate(); MyProtobuf proto = buildProtobuf(); // XXX: loops on dataFrame.au

Help with Splitter/Aggregator-like behavior

2018-09-19 Thread Ron Cecchini
So, I have a situation where I need something like a Splitter and an Aggregator. But as far as I can tell from reading and googling, maybe my situation is nonstandard? >From what I can tell, a Splitter and Aggregator are used together within a >single route. In my case, I need the Splitter and

Re: UDP: Netty4 vs. Mina2

2018-09-14 Thread Ron Cecchini
ke me too long to figure out...) > On September 14, 2018 at 3:38 PM Ron Cecchini wrote: > > > Hi, Alex. Thank you you for your help. > > > I had read all of those pages (amongst the million or so I scanned...) > but your comment made it cleare

Re: UDP: Netty4 vs. Mina2

2018-09-14 Thread Ron Cecchini
aster/components/camel-ganglia/src/test/java/org/apache/camel/component/ganglia/GangliaProtocolV31CamelTest.java#L214-L257 > > Hope this help, > Alex > > On Fri, Sep 14, 2018 at 12:26 AM Ron Cecchini > wrote: > > > > I'll try a shorter version of

UDP: Netty4 vs. Mina2

2018-09-13 Thread Ron Cecchini
I'll try a shorter version of my question: Why does this work: .to("mina2:udp://localhost:4?sync=false") ... from("mina2:udp://localhost:4?sync=false") and this doesn't work: .to("netty4:udp://localhost:4?sync=false") ... from("netty4:udp://localhost:4?sync=false") In

Problem with UDP (Netty4 vs. Mina2) & RabbitMQ (UDP vs. HTTP?)

2018-09-12 Thread Ron Cecchini
Hi, there. I'm experiencing something weird here and I'm desperate for an answer. I realize this is a long message, but it's only because I'm verbose. It's a really straight forward setup, so I'm hoping it's just an obvious configuration issue... I have a simple Server and Client setup for

Re: How to disable a servlet?

2018-08-20 Thread Ron Cecchini
t to use a different port number than 8080. > > > On Mon, Aug 20, 2018 at 9:30 PM, Ron Cecchini wrote: > > Hi there. > > > > > > I am trying to run 2 Spring Boot / Camel applications at the same time, and > > the 2nd app complains about port 8080 already being i

How to disable a servlet?

2018-08-20 Thread Ron Cecchini
Hi there. I am trying to run 2 Spring Boot / Camel applications at the same time, and the 2nd app complains about port 8080 already being in use. However, the 2nd app doesn't even need to expose any endpoints; it's just reading messages off a RabbitMQ bus that the first app is producing. So

RabbitMQ: ConnectionFactory gives "Connection refused" yet I can write all in one .to()

2018-06-25 Thread Ron Cecchini
Hi All. New Camel user here. I have a Spring Boot / Camel app and successfully got a route working which polls a REST endpoint, splits the JSON array into custom POJOS, transforms each one into one of our Protobufs, and then writes the protobuf out to our RabbitMQ. Great, right? Well, it