You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Roberto Camelk <be...@gmail.com> on 2021/11/26 17:08:45 UTC

Strange behavior with camel-k and java lang

I recently installed Camel-K for testing purposes. This was my
installation command:

kamel install \
  --force \
  --build-publish-strategy=Spectrum \
  --olm=false \
  -n platform \
  --operator-resources requests.cpu=100m \
  --operator-resources limits.cpu=200m \
  --operator-resources requests.memory=256Mi \
  --operator-resources limits.memory=1024Mi \
  --registry docker.io \
  --organization $dockerorganization \
  --registry-secret camel-k-registry-secret \
  --maven-repository $maven-url \
  --monitoring=true \
  --wait

After that I started coding some java routes for testing...

During my tests I was using the cron component, but at some moment I
have changed my java route, commenting the 'from("cron:.....")' to
start using a rabbitmq queue.

Note, I "commented" the cron code and appended a new "from" expression...

I tried multiple times to run this change (kamel run) without success.
Each try camel-k continues to run the route using the cron expression.
I also tried to reset the operator (kamel reset), but it continues to
run the cron instead of use the rabbitmq source.

After that I think: I will try to DELETE that commented lines that
define the cron from the java source file.

And tried to run it again, and NOW it ran correctly.

Can someone explain what was occuring? The camel-k java
compiler/interpreter evaluates comments? This was a little bizarre!

Re: Strange behavior with camel-k and java lang

Posted by Roberto Camelk <be...@gmail.com>.
Okay, no problem! I understand this is a new tool and very promising one!

I relieved, confirming the strange behavior, that was not my head trolling me.

Thanks for the fast-feedback.

On Fri, Nov 26, 2021 at 2:16 PM Luca Burgazzoli <lb...@gmail.com> wrote:
>
> On Fri, Nov 26, 2021 at 6:09 PM Roberto Camelk <be...@gmail.com>
> wrote:
>
> >
> > During my tests I was using the cron component, but at some moment I
> > have changed my java route, commenting the 'from("cron:.....")' to
> > start using a rabbitmq queue.
> >
> > Note, I "commented" the cron code and appended a new "from" expression...
> >
> > I tried multiple times to run this change (kamel run) without success.
> > Each try camel-k continues to run the route using the cron expression.
> > I also tried to reset the operator (kamel reset), but it continues to
> > run the cron instead of use the rabbitmq source.
> >
> > After that I think: I will try to DELETE that commented lines that
> > define the cron from the java source file.
> >
> > And tried to run it again, and NOW it ran correctly.
> >
> > Can someone explain what was occuring? The camel-k java
> > compiler/interpreter evaluates comments? This was a little bizarre!
> >
>
> Hi, we are aware of the issue and in essence, the route inspector (not the
> compiler) is not super smart at the moment and it sometimes get confused by
> comments.
> We have some plan to improve it for camel-k 2.x

Re: Strange behavior with camel-k and java lang

Posted by Luca Burgazzoli <lb...@gmail.com>.
On Fri, Nov 26, 2021 at 6:09 PM Roberto Camelk <be...@gmail.com>
wrote:

>
> During my tests I was using the cron component, but at some moment I
> have changed my java route, commenting the 'from("cron:.....")' to
> start using a rabbitmq queue.
>
> Note, I "commented" the cron code and appended a new "from" expression...
>
> I tried multiple times to run this change (kamel run) without success.
> Each try camel-k continues to run the route using the cron expression.
> I also tried to reset the operator (kamel reset), but it continues to
> run the cron instead of use the rabbitmq source.
>
> After that I think: I will try to DELETE that commented lines that
> define the cron from the java source file.
>
> And tried to run it again, and NOW it ran correctly.
>
> Can someone explain what was occuring? The camel-k java
> compiler/interpreter evaluates comments? This was a little bizarre!
>

Hi, we are aware of the issue and in essence, the route inspector (not the
compiler) is not super smart at the moment and it sometimes get confused by
comments.
We have some plan to improve it for camel-k 2.x