You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Daniel Zweifel <da...@adesso.ch> on 2011/12/01 10:58:13 UTC

How can I configure HttpClient?

Hello

I'm using ActiveMQ over http(s). Yes, I know the recommendation is "don't do
it", but I have to.


I am able to open a connection and consume messages with the following
configuration (spring):

<bean id="jms"
class="org.apache.activemq.camel.component.ActiveMQComponent">
	<property name="brokerURL" value="http://my-amq-broker" />
</bean>

// implements the org.apache.camel.Processor interface
<bean id="notificationProcessor"
class="ch.admin.babs.polyalert.client.core.jms.NotificationProcessor" />

<camelContext xmlns="http://camel.apache.org/schema/spring">
	<endpoint id="notificationTopic" uri="jms:topic:my.notifications" />
	<route>
		<from ref="notificationTopic" />
		<to uri="bean:notificationProcessor" />
	</route>
</camelContext>


In the production environment I am not allowed to directly contact
my-amq-broker, I have to go through a reverse-proxy server. For the
authentication on that reverse-proxy I have to use the basic authentication
scheme and to be able to set additional http headers.
Now to my question: How can I access/configure the HttpClient sender that
ActiveMQ uses for the HttpTransport?

Any idea is greatly appreciated.

Regards
              Daniel

--
View this message in context: http://activemq.2283324.n4.nabble.com/How-can-I-configure-HttpClient-tp4127753p4127753.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How can I configure HttpClient?

Posted by Torsten Mielke <to...@fusesource.com>.
> Now to my question: How can I access/configure the HttpClient sender that
> ActiveMQ uses for the HttpTransport?

I am not sure but this may not be possible right now. The HTTP transport reference on ActiveMQ does not seem to expose much additional configuration. 
Although the class HttpClientTransport.java has setters for the common-http client, it's the HttpTransportFactory class that instantiates a HttpClientTransport instance. This factory does not seem to take any proxy settings. 

You may want to raise a feature request.

Regards,

Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com