2 Replies Latest reply on Mar 13, 2009 6:52 AM by Torsten Mielke

    TransportConnector URI Configuration in ServiceMix

    ServiceMix Noob Newbie

      Hi all,

       

        I am using FUSE ESB 4.0.0.4. My goal is to

      configure a HA example for separate hosts. And here is my amendment of

      the activemq broker configuration:

        <transportConnectors>

      •    <transportConnector uri="failover://(tcp://localhost:61616,tcp://192.168.7.4:61616)"/>*

      • </transportConnectors>*

       

        On starting ServiceMix, what I got is the following error:

      *Transport Connector could not be registered in

      JMX: Invalid server URI:

      failover://(tcp://localhost:61616,tcp://192.168.7.4:61616)*

      •        at

      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337)*

      •        at

      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)*

      ...

      org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:276)

      •        at

      org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:145)*

      •        at java.lang.Thread.run(Thread.java:619)*

      *Caused by: java.io.IOException: Transport Connector

      could not be registered in JMX: Invalid server URI:

      failover://(tcp://localhost:61616,tcp://192.168.7.4:61616)*

      •        at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)*

      •        at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1434)*

      •        at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:1893)*

      ...

      •        at

      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)*

      •        ... 14 more*

      Caused by: java.io.IOException: Invalid server URI: failover://(tcp://localhost:61616,tcp://192.168.7.4:61616)

      •        at org.apache.activemq.transport.failover.FailoverTransportFactory.doBind(FailoverTransportFactory.java:76)*

      •        at org.apache.activemq.transport.TransportFactory.bind(TransportFactory.java:131)*

      •        at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:293)*

      •        at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:135)*

      •        at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:98)*

      •        at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1428)*

      •        ... 20 more*

       

        I take a look at the doBind() method of FailoverTransportFactory class:

        public TransportServer doBind(URI location) throws IOException {

      •        throw new IOException((new StringBuilder()).append("Invalid server URI: ").append(location).toString());*

      • }*

       

        What's wrong with my configuration?

       

      Regards,

      ServiceMix Noob

       

      Edited by: smxnoob on Mar 13, 2009 9:01 AM

        • 1. Re: TransportConnector URI Configuration in ServiceMix
          Torsten Mielke Apprentice

          The failover:// protocol is only intended to be used by JMS clients (producers, consumers). The transport connector configuration defines on which transport and what URL you want ActiveMQ to listen for messages. It does not take a failover URL, only plain URLs such as tcp://localhost:61616. It basically configures your TCP listeners.

           

          The network connector configuration controls how to cluster multiple brokers together. Here you also don't use the failover:// protocol. Instead you configure for either static or dynamic discovery of brokers.

           

          failover:// is only to be used by your JMS clients.

          • 2. Re: TransportConnector URI Configuration in ServiceMix
            Torsten Mielke Apprentice

            The failover:// protocol is only intended to be used by JMS clients (producers, consumers). The transport connector configuration defines on which transport and what URL you want ActiveMQ to listen for messages. It does not take a failover URL, only plain URLs such as tcp://localhost:61616. It basically configures your TCP listeners.

             

            The network connector configuration controls how to cluster multiple brokers together. Here you also don't use the failover:// protocol. Instead you configure for either static or dynamic discovery of brokers.

             

            failover:// is only to be used by your JMS clients.