Thanks for your reply. I am able to send messages to ActiveMQ but the
consumer is not receiving any messages sent by the producer. If I revert
back the configurations to use tcp everything is fine.
Below is the configuration I have used:
<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
<transportConnector name="ssl" uri="ssl://localhost:61617"/>
<transportConnector name="stomp" uri="stomp://localhost:61613"/>
<transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
<transportConnector name="http" uri="http://localhost:61224"/>
</transportConnectors>
Consumer configuration:
<bean id="connectionFactory"
class="org.jencks.amqpool.JcaPooledConnectionFactory">
<constructor-arg value="failover://(http://localhost:61224)" />
<property name="maxConnections" value="8" />
<property name="transactionManager" ref="transactionManager" />
<property name="name" value="LocalBroker" />
</bean>
<bean id="destination" class="org.apache.activemq.command.ActiveMQQueue"
autowire="constructor">
<constructor-arg>
<value>MoMessageVOQueue</value>
</constructor-arg>
</bean>
<bean id="messageVoConsumer"
class="com.onmobile.mcmo.servlet.MOMsgVOConsumer" init-method="start"
destroy-method="stop">
<constructor-arg>
<ref bean="connectionFactory"/>
</constructor-arg>
<constructor-arg>
<ref bean="destination"/>
</constructor-arg>
</bean>
Also I am getting the following warning in the ActiveMQ console:
WARN ManagedTransportConnection - Failed to unregister mbean:
org.apache.activemq:BrokerName=OM-BLR-LT-0657,Type=Connection,ConnectorName=http,ViewType=address,Name=blockingQueue
Let me know if I'm missing anything here.
Thanks in advance.
Post by ttmdevTo connect to the broker, your client (consumer) will need to use a http
broker URL as follows
http://broker-ip-address:port-number
The broker will need to have a http transport connector to listen for http
connection requests from the clients as follows
<transportConnectors>
<transportConnector name="http"
uri="http://broker-ip-address:port-number" />
</transportConnectors>
These jar files will have to be in your client's CLASSPATH
$ACTIVEMQ_HOME/activemq-<release number>.jar
$ACTIVEMQ_HOME/lib/optional/commons-httpclient-2.0.1.jar
$ACTIVEMQ_HOME/lib/optional/xstream-1.1.2.jar
$ACTIVEMQ_HOME/lib/optional/xmlpull-1.1.3.4d_b4_min.jar
Hope this helps,
Joe
Post by krvI need to write a consumer to receive messages over a HTTP connection
(HTTP transport connector). Can anyone point me to some useful documents
for the same?
And the consumer is outside the firewall.
--
View this message in context: http://www.nabble.com/How-to-receive-messages-over-HTTP-connection--tf4723207s2354.html#a13525225
Sent from the ActiveMQ - User mailing list archive at Nabble.com.