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&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/%[email protected]%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://camel.465427.n5.nabble.com/STOMP-SSL-bridge-between-two-ActiveMQ-Brokers-using-Camel-tp5763254.html
Sent from the Camel - Users mailing list archive at Nabble.com.