camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott England-Sullivan <sully6...@gmail.com>
Subject Re: Failover with Camel CXF
Date Fri, 30 Nov 2012 17:12:21 GMT
Hi mabahma,

The "failover:(address,address)" you are using is an ActiveMQ high-level
protocol that is recognized by the the ActiveMQConnectionFactory.  So it
will work as expected for Camel ActiveMQ or Camel JMS components that are
connecting to an ActiveMQ broker.

Other Camel components have the Load Balancer EIP available to use to
implement similar functionality.  More details can be found here:
http://camel.apache.org/load-balancer.html

As an example though, using your CXF Endpoint and beans you could use the
following:

<endpoint id="service1" uri="cxf://http://localhost:8080/sw/service1"/>

<route streamCache="true">
    <from ref="service1" />
        <loadBalance>
           <failover>
              <exception>java.lang.Throwable</exception>
           </failover>
           <to uri="cxf:bean:service1" />
           <to uri="cxf:bean:service2" />
        </loadBalance>
</route>


Hope this helps.

Best Regards,
Scott ES

On Fri, Nov 30, 2012 at 7:34 AM, mabahma <mabahma@hotmail.com> wrote:

> Hello,
>
> I have many routes with many components like Activemq and CXF.
>
> I'm using the failover protocol to loadbalance Activemq brokers and CXF
> webServices.
>
> *The sysntax : failover:(tcp://server1:61616,tcp://server2:61616)*  is
> working and messages
>
> routed to one broker when the other is down.
>
>  but the one with CXF is not working
> *
> failover:(cxf:bean:service1,cxf:bean:service2)* gives the exception
>
> service1 on service2 are 2 CXF endpoint beans defined in Camel context:
>
> *<endpoint id="service1" uri="cxf://http://localhost:8080/sw/service1"/>*
>
> *Failed to resolve endpoint:
> failover://(cxf:bean:service1,cxf:bean:service2) due to: No component found
> with scheme: failover*
>
> Have you any idea ?
>
> Many thanks
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Failover-with-Camel-CXF-tp5723454.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
-- 
Scott England-Sullivan
Apache Camel Committer
Principal Consultant / Sr. Architect | Red Hat, Inc.
FuseSource is now part of Red Hat
Web:     fusesource.com <http://www.fusesource.com> |
redhat.com<http://www.redhat.com>
Blog:     sully6768.blogspot.com
Twitter: sully6768

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message