You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by doug5791 <to...@uwgb.edu> on 2014/03/16 08:59:52 UTC

Camel-Hazelcast: How to setup multiple nodes?

I am working with Apache Camel and the Hazelcast component and I would like
to know if there is a way to implement this component in a route that
utilized more than one node in the data-grid.

An example of the route I am using now that generates ONE node is as
follows:
`from(direct:foo).toF("hazelcast:%stest", HazelcastConstants.LIST_PREFIX);`

If I happen to be sending large volumes of data through this route, it would
be nice to have the data dumped to a grid of multiple nodes.

I found no reference to using multiple nodes  here
<http://camel.apache.org/hazelcast-component.html>  .





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Hazelcast-How-to-setup-multiple-nodes-tp5748848.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-Hazelcast: How to setup multiple nodes?

Posted by doug5791 <to...@uwgb.edu>.
I started up a cluster of nodes running from localhost and then started my
camel-hazelcast route which appeared to join into the existing cluster with
no problem. After populating a List in Hazelcast I wrote a quick Hazelcast
client to check that the data was stored properly. It was.

Thanks for your help!
-Doug



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Hazelcast-How-to-setup-multiple-nodes-tp5748848p5748987.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-Hazelcast: How to setup multiple nodes?

Posted by Stephan Burkard <sb...@gmail.com>.
Well, that was quite a wild guess ;-)

If I would like to do this, I would try to use the Camel hazelcast
component to start a local instance and configure it with hazelcast.xml to
connect to other existing nodes that are not started by Camel but as plain
hazelcast instances. Then I would send messages to my local hazelcast. But
then I would not get better availability, just backups of my local
hazelcast node (if configured).

You could probably also use a bean that uses the Client-API:
http://www.hazelcast.org/docs/2.0/manual/html-single/#JavaClient

Cheers
Stephan



On Mon, Mar 17, 2014 at 3:16 PM, doug5791 <to...@uwgb.edu> wrote:

> Thank you for that information it was very helpful and makes sense.
>
> Out of curiosity,  how would I go about connecting with a standalone grid?
>
>
> "Stephan Burkard [via Camel]" <ml...@n5.nabble.com>
> wrote:
>
> Hi
>
> You can deploy multiple instances of your application/bundle/whatever
> containing the Camel route.
>
> For example if you have an OSGi bundle that contains the route above, just
> install the bundle on multiple OSGi containers. Each bundle will set up the
> route and each bundle will start a hazelcast instance. The hazelcast
> instances will find each other (as default) per multicasting (if not
> blocked by firewalls). If multicasting is a problem, you can configure the
> nodes in a hazelcast.xml file.
>
> With this layout you can distribute the load and you also have better
> availability if one node goes down (as long as the input to direct:foo
> redirects to other nodes).
>
> I'm not sure how to do if you just want to have multiple hazelcast-nodes,
> but only one instance of your route, I guess you would have to setup the
> hazelcast grid "standalone" and send messages from your route to it.
>
> Stephan
>
>
> On Sun, Mar 16, 2014 at 8:59 AM, doug5791 <[hidden
> email]</user/SendEmail.jtp?type=node&node=5748952&i=0>> wrote:
>
> > I am working with Apache Camel and the Hazelcast component and I would
> like
> > to know if there is a way to implement this component in a route that
> > utilized more than one node in the data-grid.
> >
> > An example of the route I am using now that generates ONE node is as
> > follows:
> > `from(direct:foo).toF("hazelcast:%stest",
> HazelcastConstants.LIST_PREFIX);`
> >
> > If I happen to be sending large volumes of data through this route, it
> > would
> > be nice to have the data dumped to a grid of multiple nodes.
> >
> > I found no reference to using multiple nodes  here
> > <http://camel.apache.org/hazelcast-component.html>  .
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-Hazelcast-How-to-setup-multiple-nodes-tp5748848.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-Hazelcast-How-to-setup-multiple-nodes-tp5748848p5748952.html
> To unsubscribe from Camel-Hazelcast: How to setup multiple nodes?, click
> here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5748848&code=dG9iZWRhMjFAdXdnYi5lZHV8NTc0ODg0OHwxNzM2OTQ0MzM3
> >.
> NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Hazelcast-How-to-setup-multiple-nodes-tp5748848p5748971.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Camel-Hazelcast: How to setup multiple nodes?

Posted by doug5791 <to...@uwgb.edu>.
Thank you for that information it was very helpful and makes sense.

Out of curiosity,  how would I go about connecting with a standalone grid?


"Stephan Burkard [via Camel]" <ml...@n5.nabble.com> wrote:

Hi

You can deploy multiple instances of your application/bundle/whatever
containing the Camel route.

For example if you have an OSGi bundle that contains the route above, just
install the bundle on multiple OSGi containers. Each bundle will set up the
route and each bundle will start a hazelcast instance. The hazelcast
instances will find each other (as default) per multicasting (if not
blocked by firewalls). If multicasting is a problem, you can configure the
nodes in a hazelcast.xml file.

With this layout you can distribute the load and you also have better
availability if one node goes down (as long as the input to direct:foo
redirects to other nodes).

I'm not sure how to do if you just want to have multiple hazelcast-nodes,
but only one instance of your route, I guess you would have to setup the
hazelcast grid "standalone" and send messages from your route to it.

Stephan


On Sun, Mar 16, 2014 at 8:59 AM, doug5791 <[hidden email]</user/SendEmail.jtp?type=node&node=5748952&i=0>> wrote:

> I am working with Apache Camel and the Hazelcast component and I would like
> to know if there is a way to implement this component in a route that
> utilized more than one node in the data-grid.
>
> An example of the route I am using now that generates ONE node is as
> follows:
> `from(direct:foo).toF("hazelcast:%stest", HazelcastConstants.LIST_PREFIX);`
>
> If I happen to be sending large volumes of data through this route, it
> would
> be nice to have the data dumped to a grid of multiple nodes.
>
> I found no reference to using multiple nodes  here
> <http://camel.apache.org/hazelcast-component.html>  .
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Hazelcast-How-to-setup-multiple-nodes-tp5748848.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Camel-Hazelcast-How-to-setup-multiple-nodes-tp5748848p5748952.html
To unsubscribe from Camel-Hazelcast: How to setup multiple nodes?, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5748848&code=dG9iZWRhMjFAdXdnYi5lZHV8NTc0ODg0OHwxNzM2OTQ0MzM3>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Hazelcast-How-to-setup-multiple-nodes-tp5748848p5748971.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-Hazelcast: How to setup multiple nodes?

Posted by Stephan Burkard <sb...@gmail.com>.
Hi

You can deploy multiple instances of your application/bundle/whatever
containing the Camel route.

For example if you have an OSGi bundle that contains the route above, just
install the bundle on multiple OSGi containers. Each bundle will set up the
route and each bundle will start a hazelcast instance. The hazelcast
instances will find each other (as default) per multicasting (if not
blocked by firewalls). If multicasting is a problem, you can configure the
nodes in a hazelcast.xml file.

With this layout you can distribute the load and you also have better
availability if one node goes down (as long as the input to direct:foo
redirects to other nodes).

I'm not sure how to do if you just want to have multiple hazelcast-nodes,
but only one instance of your route, I guess you would have to setup the
hazelcast grid "standalone" and send messages from your route to it.

Stephan


On Sun, Mar 16, 2014 at 8:59 AM, doug5791 <to...@uwgb.edu> wrote:

> I am working with Apache Camel and the Hazelcast component and I would like
> to know if there is a way to implement this component in a route that
> utilized more than one node in the data-grid.
>
> An example of the route I am using now that generates ONE node is as
> follows:
> `from(direct:foo).toF("hazelcast:%stest", HazelcastConstants.LIST_PREFIX);`
>
> If I happen to be sending large volumes of data through this route, it
> would
> be nice to have the data dumped to a grid of multiple nodes.
>
> I found no reference to using multiple nodes  here
> <http://camel.apache.org/hazelcast-component.html>  .
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Hazelcast-How-to-setup-multiple-nodes-tp5748848.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>