Hi folks,

i finally got it working like this:

Broker 1:

    <transportConnectors>
       <transportConnector name="inbound_openwire"
uri="tcp://localhost:61616"/>
       <transportConnector name="inbound_http"    
uri="http://0.0.0.0:61617"/>
    </transportConnectors>

    <networkConnectors>
      <networkConnector name="outbound_http"
uri="static://(http://broker-2:61617?proxyHost=myProxy&amp;proxyPort=3128)"
networkTTL="5"/>
    </networkConnectors>


Broker 2:


    <transportConnectors>
       <transportConnector name="inbound_openwire"
uri="tcp://localhost:61616"/>
       <transportConnector name="inbound_http"    
uri="http://0.0.0.0:61617"/>
    </transportConnectors>

    <networkConnectors>
      <networkConnector name="outbound_http"
uri="static://(http://broker-1:61617?proxyHost=myProxy&amp;proxyPort=3128)"
networkTTL="5"/>
    </networkConnectors>


Squid:

-> without authentication

Consumer:

ant consumer -Durl=tcp://broker-1:61616

Producer:

ant producer -Durl=tcp://broker-2:61616

If i stop the squid-proxy -> no messages are delivered anymore

If i restart the squid-proxy -> messages are delivered 

So, i guess it works......

One last issue:

I can not pass parameters in the URI like:

?proxyHost=myProxy&proxyPort=3128

The broker gives me the following error on startup:

ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
56 in XML document from class path resource [activemq.xml] is invalid;
nested exception is org.xml.sax.SAXParseException: The reference to entity
"proxyPort" must end with the ';' delimiter.
java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
56 in XML document from class path resource [activemq.xml] is invalid;
nested exception is org.xml.sax.SAXParseException: The reference to entity
"proxyPort" must end with the ';' delimiter.
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:51)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:104)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:51)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:76)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
        at org.apache.activemq.console.Main.main(Main.java:106)
Caused by:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
56 in XML document from class path resource [activemq.xml] is invalid;
nested exception is org.xml.sax.SAXParseException: The reference to entity
"proxyPort" must end with the ';' delimiter.


Instead i have to use:

?proxyHost=myProxy&*amp;proxyPort=3128

(Minus the "*" because the mailing-list won't show this part of the string.)

According to the Jira-entry here:

-> https://issues.apache.org/activemq/browse/AMQ-1099

this should not be necessary.

Any ideas?
-- 
View this message in context: 
http://www.nabble.com/How-do-i-configure-the-http-transport-connector-to-use-a-proxy--tp16964261s2354p17109982.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to