activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ttom <tam...@nikhef.nl>
Subject STOMP+SSL bridge between two ActiveMQ Brokers
Date Thu, 26 Feb 2015 14:53:22 GMT
Hi!

I've been trying to set up a STOMP+SSL bridge between two ActiveMQ brokers
without any luck. 
What I want to achieve is the following:

STOMP client  --(SEND)--> Broker1 (activemq) --(MAGIC)--> Broker2 (activemq)
--(REC)--> STOMP reciever

These are the only transportConnectors on both brokers:

Broker1: <transportConnector name="stomp+ssl"
uri="stomp+ssl://0.0.0.0:61613/>)
Broker2: <transportConnector name="stomp+ssl"
uri="stomp+ssl://0.0.0.0:61613/>)

The catch is that Broker2 is out of my control domain, so it expects
messages only on the stomp+ssl transportConnector. 
I do NOT want to create a network of brokers out of Broker1 and Broker2! 

I tried several ways to make the MAGIC happen:

1.) have a networkConnector configured in Broker1 one that forwards messages
to Broker2 as such:
    
    Broker1: <networkConnector uri="static:(stomp+ssl://Broker2:61613)"
staticBridge="true">

    This failed with java.lang.IllegalArgumentException: Invalid connect
parameters: {wireFormat.host=Broker2}
    If I understand correctly, the networkConnector is used to create a
network of brokers anyway, 
    which is not really what I want, so I abandoned it.


2.) Use Camel to route messages from Broker1 to Broker2 with the following
config at Broker1:
 

    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"
depends-on="Broker1">
        <route>
           <from uri="broker1-activemq:queue:foo"/>
           <to uri="broker2-activemq:queue:foo"/>
        </route>
    </camelContext>

    <bean id="broker1-activemq" 
          class="org.apache.activemq.camel.component.ActiveMQComponent"
          depends-on="Broker1">
        <property name="brokerURL"
value="vm://Broker1?create=false&amp;waitForStart=5000"/>
    </bean>

    <bean id="broker2-activemq" 
          class="org.apache.camel.component.stomp.StompComponent">
        <property name="brokerURL" value="stomp+ssl://Broker2:61613"/>
    </bean>

    
    ActiveMQComponent seemed like it cannot do STOMP (
http://mail-archives.apache.org/mod_mbox/activemq-dev/201409.mbox/%3C54063BD6.2050000@gmail.com%3E
) so I added the camel-stomp and stompjms-client libraries containing
org.apache.camel.component.stomp.StompComponent to activemq/lib/came/.  This
setup fails at startup with: Unsupported URI scheme 'stomp+ssl'. 
    
   This page (http://camel.apache.org/stomp.html) suggested to change the
'stomp+ssl' to 'tcp' in which case the broker starts up correctly, but the
connection to Broker2 is refused because it's not using ssl. 

Any suggenstions on how to go about this? Isn't there a nice STOMP client
implementation supporting SSL that Camel or ActiveMQ can use natively? 
  
Thanks,
Tom
 

PS: software versions: apache-activemq-5.11.1 , apache-camel-2.14.1 ,
stompjms-client-1.19



--
View this message in context: http://activemq.2283324.n4.nabble.com/STOMP-SSL-bridge-between-two-ActiveMQ-Brokers-tp4692106.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message