Using master with zookeeper cluster service fails

2022-09-27 Thread Ephemeris Lappis
Hello.

I'm trying to port to Karaf some bundles that we run today on Red-Hat
Fuse that provides a "master" component to handle concurrent
consumers.

I've configured a Camel Cluster Service based on the ZooKeeper
implementation, exposed a service in a bundle, and then I reference
this service in the bundle that provides routes using "master".

But I've an exception that seems to be related to an internal
dependance of the ZooKeeper service : Caused by:
java.lang.ClassNotFoundException:
org.apache.curator.shaded.com.google.common.cache.CacheBuilder not
found by curator-framework

I don't understand exactly what this "curator framework" does, but
something is probably missing in the camel-zookeeper feature.

Has someone used these components before, and experienced the same issues ?

I've seen some kind of bug report about the bad OSGi integration of
this framework, but no solution or at least workaround to make it
work.

Should I use another Camel Cluster implementation ?

Thanks for your help.

Regards.


Re: Using master with zookeeper cluster service fails

2022-09-27 Thread Grzegorz Grzybek
Hello

wt., 27 wrz 2022 o 09:16 Ephemeris Lappis 
napisał(a):

> Hello.
>
> I'm trying to port to Karaf some bundles that we run today on Red-Hat
> Fuse that provides a "master" component to handle concurrent
> consumers.
>

Which version of Red Hat Fuse are you using? Version 6 has very
sensitive/advanced/complex curator and zookeeper integration, because some
classes are changed to "fix" the original OSGi problems in old version of
curator.
Upstream curator/zookeeper versions have (AFAIK) OSGi integration simply
inherited from older contributions and sometimes it may cause problems in
later versions - mostly related to Guava integration.


>
> I've configured a Camel Cluster Service based on the ZooKeeper
> implementation, exposed a service in a bundle, and then I reference
> this service in the bundle that provides routes using "master".
>

Which Camel version, Which Zookeeper version?


>
> But I've an exception that seems to be related to an internal
> dependance of the ZooKeeper service : Caused by:
> java.lang.ClassNotFoundException:
> org.apache.curator.shaded.com.google.common.cache.CacheBuilder not
> found by curator-framework
>

Which Curator version are you using? I've quickly checked versions between
2.6.0 and 5.1.0, but all these simply import-package
com.google.common.cache - so they expect the package to come from Guava
instead of being shaded/private-packaged..


>
> I don't understand exactly what this "curator framework" does, but
> something is probably missing in the camel-zookeeper feature.
>

Curator is to Zookeeper like Guava was supposed to be
(integration/versioning problems aside) java.util collections. Kind of
higher-level library with "recipes" implemented on top of low-level
Zookeeper "primitives".


>
> Has someone used these components before, and experienced the same issues ?
>
> I've seen some kind of bug report about the bad OSGi integration of
> this framework, but no solution or at least workaround to make it
> work.
>

If you share more details (versions, features you've installed, Karaf
version used), we can try establishing some workaround ;)


> Should I use another Camel Cluster implementation ?
>

I can help with OSGi, not with Camel Clustering ;)

kind regards
Grzegorz Grzybek


>
> Thanks for your help.
>
> Regards.
>


Re: Using master with zookeeper cluster service fails

2022-09-27 Thread Ephemeris Lappis
Hello.

The versions are the following :

Karaf 4.4.1
Camel 2.25.4 (so the same for camel-master, camel-zookeeper, and so on)

The curator version that is linked to these versions is 2.12.0 :
113 │ Active   │  50 │ 2.12.0 │ Curator Client
114 │ Active   │  50 │ 2.12.0 │ Curator Framework
115 │ Active   │  50 │ 2.12.0 │ Curator Recipes
116 │ Active   │  50 │ 2.12.0 │ Curator Service Discovery

And indeed, the missing package is not exported by any started bundle.

What kind of workaround could you suggest ?

My Camel Cluster Service is provided using a feature :

http://karaf.apache.org/xmlns/features/v1.6.0";
name="my-test-26-karaf-s-master">

mvn:org.apache.camel.karaf/apache-camel/2.25.4/xml/features

Fifi-T26 :: Master Service
camel-master
camel-zookeeper
mvn:my.tests/my-test-26-karaf-s-master/0.0.1-SNAPSHOT

osgi.service;objectClass=org.apache.camel.cluster.CamelClusterService);effective:=active



Should it be possible to add other bundles/features to provide the
missing packages out of the current zookeeper ?

Thanks.

Regards.



Le mar. 27 sept. 2022 à 10:27, Grzegorz Grzybek  a écrit :
>
> Hello
>
> wt., 27 wrz 2022 o 09:16 Ephemeris Lappis 
> napisał(a):
>
> > Hello.
> >
> > I'm trying to port to Karaf some bundles that we run today on Red-Hat
> > Fuse that provides a "master" component to handle concurrent
> > consumers.
> >
>
> Which version of Red Hat Fuse are you using? Version 6 has very
> sensitive/advanced/complex curator and zookeeper integration, because some
> classes are changed to "fix" the original OSGi problems in old version of
> curator.
> Upstream curator/zookeeper versions have (AFAIK) OSGi integration simply
> inherited from older contributions and sometimes it may cause problems in
> later versions - mostly related to Guava integration.
>
>
> >
> > I've configured a Camel Cluster Service based on the ZooKeeper
> > implementation, exposed a service in a bundle, and then I reference
> > this service in the bundle that provides routes using "master".
> >
>
> Which Camel version, Which Zookeeper version?
>
>
> >
> > But I've an exception that seems to be related to an internal
> > dependance of the ZooKeeper service : Caused by:
> > java.lang.ClassNotFoundException:
> > org.apache.curator.shaded.com.google.common.cache.CacheBuilder not
> > found by curator-framework
> >
>
> Which Curator version are you using? I've quickly checked versions between
> 2.6.0 and 5.1.0, but all these simply import-package
> com.google.common.cache - so they expect the package to come from Guava
> instead of being shaded/private-packaged..
>
>
> >
> > I don't understand exactly what this "curator framework" does, but
> > something is probably missing in the camel-zookeeper feature.
> >
>
> Curator is to Zookeeper like Guava was supposed to be
> (integration/versioning problems aside) java.util collections. Kind of
> higher-level library with "recipes" implemented on top of low-level
> Zookeeper "primitives".
>
>
> >
> > Has someone used these components before, and experienced the same issues ?
> >
> > I've seen some kind of bug report about the bad OSGi integration of
> > this framework, but no solution or at least workaround to make it
> > work.
> >
>
> If you share more details (versions, features you've installed, Karaf
> version used), we can try establishing some workaround ;)
>
>
> > Should I use another Camel Cluster implementation ?
> >
>
> I can help with OSGi, not with Camel Clustering ;)
>
> kind regards
> Grzegorz Grzybek
>
>
> >
> > Thanks for your help.
> >
> > Regards.
> >


Re: Using master with zookeeper cluster service fails

2022-09-27 Thread Grzegorz Grzybek
Hello



wt., 27 wrz 2022 o 10:44 Ephemeris Lappis 
napisał(a):

> Hello.
>
> The versions are the following :
>
> Karaf 4.4.1
> Camel 2.25.4 (so the same for camel-master, camel-zookeeper, and so on)
>
> The curator version that is linked to these versions is 2.12.0 :
> 113 │ Active   │  50 │ 2.12.0 │ Curator Client
> 114 │ Active   │  50 │ 2.12.0 │ Curator Framework
> 115 │ Active   │  50 │ 2.12.0 │ Curator Recipes
> 116 │ Active   │  50 │ 2.12.0 │ Curator Service Discovery
>
> And indeed, the missing package is not exported by any started bundle.
>
> What kind of workaround could you suggest ?
>
> My Camel Cluster Service is provided using a feature :
> 
> http://karaf.apache.org/xmlns/features/v1.6.0";
> name="my-test-26-karaf-s-master">
>
> mvn:org.apache.camel.karaf/apache-camel/2.25.4/xml/features
> 
> Fifi-T26 :: Master Service
>  prerequisite="true">camel-master
>  prerequisite="true">camel-zookeeper
>
> mvn:my.tests/my-test-26-karaf-s-master/0.0.1-SNAPSHOT
>
> osgi.service;objectClass=org.apache.camel.cluster.CamelClusterService);effective:=active
> 
> 
>
> Should it be possible to add other bundles/features to provide the
> missing packages out of the current zookeeper ?
>

https://issues.apache.org/jira/browse/CURATOR-464 describes your problem
and it's "fixed in 5.0.0" - I have no idea if camel-zookeeper will even
work with Curator 5.0.0...

And one of the comments under CURATOR-464 confirms my theory:

Unfortunately, the committers don't know much about OSGi. We've always
> relied on contributors to maintain OSGi compatibility.
>

I don't have any special workaround for you unfortunately... You've
mentioned moving away from Red Hat Fuse. To get similar (as in Fuse 6)
camel-master / zookeeper behavior, looks like you need something more than
a workaround...
But if you really want a workaround, you'd have to ... fork curator 2.12.0
and recompile it to use shaded or imported version of
com.google.common.cache package...

regards
Grzegorz Grzybek


>
> Thanks.
>
> Regards.
>
>
>
> Le mar. 27 sept. 2022 à 10:27, Grzegorz Grzybek  a
> écrit :
> >
> > Hello
> >
> > wt., 27 wrz 2022 o 09:16 Ephemeris Lappis 
> > napisał(a):
> >
> > > Hello.
> > >
> > > I'm trying to port to Karaf some bundles that we run today on Red-Hat
> > > Fuse that provides a "master" component to handle concurrent
> > > consumers.
> > >
> >
> > Which version of Red Hat Fuse are you using? Version 6 has very
> > sensitive/advanced/complex curator and zookeeper integration, because
> some
> > classes are changed to "fix" the original OSGi problems in old version of
> > curator.
> > Upstream curator/zookeeper versions have (AFAIK) OSGi integration simply
> > inherited from older contributions and sometimes it may cause problems in
> > later versions - mostly related to Guava integration.
> >
> >
> > >
> > > I've configured a Camel Cluster Service based on the ZooKeeper
> > > implementation, exposed a service in a bundle, and then I reference
> > > this service in the bundle that provides routes using "master".
> > >
> >
> > Which Camel version, Which Zookeeper version?
> >
> >
> > >
> > > But I've an exception that seems to be related to an internal
> > > dependance of the ZooKeeper service : Caused by:
> > > java.lang.ClassNotFoundException:
> > > org.apache.curator.shaded.com.google.common.cache.CacheBuilder not
> > > found by curator-framework
> > >
> >
> > Which Curator version are you using? I've quickly checked versions
> between
> > 2.6.0 and 5.1.0, but all these simply import-package
> > com.google.common.cache - so they expect the package to come from Guava
> > instead of being shaded/private-packaged..
> >
> >
> > >
> > > I don't understand exactly what this "curator framework" does, but
> > > something is probably missing in the camel-zookeeper feature.
> > >
> >
> > Curator is to Zookeeper like Guava was supposed to be
> > (integration/versioning problems aside) java.util collections. Kind of
> > higher-level library with "recipes" implemented on top of low-level
> > Zookeeper "primitives".
> >
> >
> > >
> > > Has someone used these components before, and experienced the same
> issues ?
> > >
> > > I've seen some kind of bug report about the bad OSGi integration of
> > > this framework, but no solution or at least workaround to make it
> > > work.
> > >
> >
> > If you share more details (versions, features you've installed, Karaf
> > version used), we can try establishing some workaround ;)
> >
> >
> > > Should I use another Camel Cluster implementation ?
> > >
> >
> > I can help with OSGi, not with Camel Clustering ;)
> >
> > kind regards
> > Grzegorz Grzybek
> >
> >
> > >
> > > Thanks for your help.
> > >
> > > Regards.
> > >
>


Re: how to create Camel HTTP route with async handling

2022-09-27 Thread chiochuan
Hi,I looking with async components that can do like below Flowchart Maker & Online Diagram Softwareviewer.diagrams.netWhich the http component can wait for callback before responding back to the request ThanksOn 26 Sep 2022, at 11:18 PM, Jeremy Ross  wrote:The REST component as well.https://camel.apache.org/components/3.18.x/rest-component.htmlOn Mon, Sep 26, 2022 at 8:40 AM ski n  wrote:I would check the Jetty component:https://camel.apache.org/components/3.18.x/jetty-component.htmlThe Jetty component can consume HTTP requests and pass it to Kafka.RaymondOn Sun, Sep 25, 2022 at 4:14 PM Chio Chuan Ooi wrote:Hi All,I am trying to create an application which can expose the http routewhichpublishes messages to kafka and can listen to all webhook to return toas aresponse.Is there any component in Camel that I can use for that purpose? ,-.   ,-.    ,-. |camel|   |other|    |other| `-+---'   `-+---'    `-+---'  http req | |  |  >| |  |   |  kafka  |  |   |>|  |   | |  kafka   |   | |->|   | |  |   |    http request    |   |<+--|   |-+->|   |    http response   |   http res| |  |  <| |  |Thanks and Regards,Chio Chuan

Re: Using master with zookeeper cluster service fails

2022-09-27 Thread Ephemeris Lappis
Hello.

Thanks for your explanations.

As I'm not sure the best way for us now should be doing our own
changes on camel-zookeper, curator and so on, could you advise about
an alternative Cluster Service that actually works with master, and
that I can use, at least for tests (jgroups for example) ?

Thanks again.

Regards.

Le mar. 27 sept. 2022 à 10:54, Grzegorz Grzybek  a écrit :
>
> Hello
>
>
>
> wt., 27 wrz 2022 o 10:44 Ephemeris Lappis 
> napisał(a):
>
> > Hello.
> >
> > The versions are the following :
> >
> > Karaf 4.4.1
> > Camel 2.25.4 (so the same for camel-master, camel-zookeeper, and so on)
> >
> > The curator version that is linked to these versions is 2.12.0 :
> > 113 │ Active   │  50 │ 2.12.0 │ Curator Client
> > 114 │ Active   │  50 │ 2.12.0 │ Curator Framework
> > 115 │ Active   │  50 │ 2.12.0 │ Curator Recipes
> > 116 │ Active   │  50 │ 2.12.0 │ Curator Service Discovery
> >
> > And indeed, the missing package is not exported by any started bundle.
> >
> > What kind of workaround could you suggest ?
> >
> > My Camel Cluster Service is provided using a feature :
> > 
> > http://karaf.apache.org/xmlns/features/v1.6.0";
> > name="my-test-26-karaf-s-master">
> >
> > mvn:org.apache.camel.karaf/apache-camel/2.25.4/xml/features
> > 
> > Fifi-T26 :: Master Service
> >  > prerequisite="true">camel-master
> >  > prerequisite="true">camel-zookeeper
> >
> > mvn:my.tests/my-test-26-karaf-s-master/0.0.1-SNAPSHOT
> >
> > osgi.service;objectClass=org.apache.camel.cluster.CamelClusterService);effective:=active
> > 
> > 
> >
> > Should it be possible to add other bundles/features to provide the
> > missing packages out of the current zookeeper ?
> >
>
> https://issues.apache.org/jira/browse/CURATOR-464 describes your problem
> and it's "fixed in 5.0.0" - I have no idea if camel-zookeeper will even
> work with Curator 5.0.0...
>
> And one of the comments under CURATOR-464 confirms my theory:
>
> Unfortunately, the committers don't know much about OSGi. We've always
> > relied on contributors to maintain OSGi compatibility.
> >
>
> I don't have any special workaround for you unfortunately... You've
> mentioned moving away from Red Hat Fuse. To get similar (as in Fuse 6)
> camel-master / zookeeper behavior, looks like you need something more than
> a workaround...
> But if you really want a workaround, you'd have to ... fork curator 2.12.0
> and recompile it to use shaded or imported version of
> com.google.common.cache package...
>
> regards
> Grzegorz Grzybek
>
>
> >
> > Thanks.
> >
> > Regards.
> >
> >
> >
> > Le mar. 27 sept. 2022 à 10:27, Grzegorz Grzybek  a
> > écrit :
> > >
> > > Hello
> > >
> > > wt., 27 wrz 2022 o 09:16 Ephemeris Lappis 
> > > napisał(a):
> > >
> > > > Hello.
> > > >
> > > > I'm trying to port to Karaf some bundles that we run today on Red-Hat
> > > > Fuse that provides a "master" component to handle concurrent
> > > > consumers.
> > > >
> > >
> > > Which version of Red Hat Fuse are you using? Version 6 has very
> > > sensitive/advanced/complex curator and zookeeper integration, because
> > some
> > > classes are changed to "fix" the original OSGi problems in old version of
> > > curator.
> > > Upstream curator/zookeeper versions have (AFAIK) OSGi integration simply
> > > inherited from older contributions and sometimes it may cause problems in
> > > later versions - mostly related to Guava integration.
> > >
> > >
> > > >
> > > > I've configured a Camel Cluster Service based on the ZooKeeper
> > > > implementation, exposed a service in a bundle, and then I reference
> > > > this service in the bundle that provides routes using "master".
> > > >
> > >
> > > Which Camel version, Which Zookeeper version?
> > >
> > >
> > > >
> > > > But I've an exception that seems to be related to an internal
> > > > dependance of the ZooKeeper service : Caused by:
> > > > java.lang.ClassNotFoundException:
> > > > org.apache.curator.shaded.com.google.common.cache.CacheBuilder not
> > > > found by curator-framework
> > > >
> > >
> > > Which Curator version are you using? I've quickly checked versions
> > between
> > > 2.6.0 and 5.1.0, but all these simply import-package
> > > com.google.common.cache - so they expect the package to come from Guava
> > > instead of being shaded/private-packaged..
> > >
> > >
> > > >
> > > > I don't understand exactly what this "curator framework" does, but
> > > > something is probably missing in the camel-zookeeper feature.
> > > >
> > >
> > > Curator is to Zookeeper like Guava was supposed to be
> > > (integration/versioning problems aside) java.util collections. Kind of
> > > higher-level library with "recipes" implemented on top of low-level
> > > Zookeeper "primitives".
> > >
> > >
> > > >
> > > > Has someone used these components before, and experienced the same
> > issues ?
> > > >
> > > > I've seen some kind of bug report about the bad OSGi integration of
> > > > this framework, but no 

Re: how to create Camel HTTP route with async handling

2022-09-27 Thread ski n
With the Jetty component you set the option: *continuationTimeout* to 0
which means it will never expire (default is 30 seconds).

When you use a JMS Broker (like ActiveMQ) there also an option to set the
request Timout (
https://camel.apache.org/components/3.18.x/jms-component.html) and for
Kafka there is the option: *consumerRequestTimeoutMs*.

Raymond

On Tue, Sep 27, 2022 at 12:39 PM  wrote:

> Hi,
>
> I looking with async components that can do like below
> Flowchart Maker & Online Diagram Software
> 
> viewer.diagrams.net
> 
> [image: apple-touch-icon.png]
>