We are trying to get clustering configured for our application so that jms
topic messages will be handled properly by the servers in the cluster. We are
using a hardware load balancer.
We have set up a default-cluster, using tcp and set the cluster-message-routing
property to server-to-server. We see subscription messages being broadcast and
received between the servers in the cluster.
>From the server you subscribe to:
2009-06-30 17:49:01,248 INFO [STDOUT] [Flex] Sending subscription to peers for
subscribe? false selector: login='john' or systemwide='true' subtopic: null
and on the other server:
2009-06-30 17:49:01,989 INFO [STDOUT] [Flex] Received subscription from peer:
10.230.3.4:7800 subscribe? true selector: login='john' or systemwide='true'
subtopic: null
The issue is that messages posted to the jms topic don't seem to get sent to
the other servers in the cluster. If you are connected to the server handling
the message you will receive it, otherwise nothing. Also there is nothing in
the logs indicating the topic messages are being sent to the other servers.
Any thoughts on what may be wrong?
Thanks for your help.
in services-config.xml:
<channels>
<channel-definition id="my-rtmp"
class="mx.messaging.channels.RTMPChannel">
<endpoint url="rtmp://myserver.com:2037"
class="flex.messaging.endpoints.RTMPEndpoint"/>
<properties>
<idle-timeout-minutes>0</idle-timeout-minutes>
</properties>
</channel-definition>
</channels>
<clusters>
<cluster id="default-cluster" properties="jgroups-tcp.xml"
url-load-balancing="false" default="true"/>
</clusters>
in messaging-config.xml:
<adapters>
<adapter-definition id="actionscript"
class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" de
fault="true" />
<adapter-definition id="jms"
class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
</adapters>
<destination id="topicMessage">
<properties>
<server>
<cluster-message-routing>server-to-server</cluster-message-routing>
</server>
<jms>
<destination-type>Topic</destination-type>
<message-type>javax.jms.ObjectMessage</message-type>
<connection-factory>TopicConnectionFactory</connection-factory>
<destination-jndi-name>topicMessage</destination-jndi-name>
<destination-name>topicMessage</destination-name>
<delivery-mode>PERSISTENT</delivery-mode>
<message-priority>DEFAULT_PRIORITY</message-priority>
<acknowledge-mode>CLIENT_ACKNOWLEDGE</acknowledge-mode>
<transacted-sessions>false</transacted-sessions>
<initial-context-environment>
<property>
<name>Context.PROVIDER_URL</name>
<value>jnp://server002:1099</value>
</property>
</initial-context-environment>
</jms>
</properties>
<channels>
<channel ref="my-rtmp"/>
</channels>
<adapter ref="jms"/>
</destination>