Note that there are some explanatory texts on larger screens.

plurals
  1. POConfiguring ActiveMQ embedded in WAS cluster
    text
    copied!<p>Maybe it is not the usual way to do things but we are trying to deploy an application (EAR) inside a WAS 6.1 cluster with 2 nodes.</p> <p>Each node will have his own broker and we would like to have them connected as a network via discovery.</p> <p>The clients will connect to one of them via discovery also, and we have only one queue and one topic, and indeed is only the topic which needs to be in a broker network becouse the producer is inside the nodes and the consumer will be one of the client that can be connected to either node.</p> <p>This has lead us to several problems, as we have to deploy only one EAR with one activemq.xml config file in it.</p> <pre><code>&lt;beans:beans xmlns:beans="http://www.springframework.org/schema/beans" xmlns="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring-2.5.0.xsd"&gt; &lt;!-- Allows us to use system properties as variables in this configuration file &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt; &lt;property name="locations"&gt; &lt;value&gt;file:///./conf/credentials.properties&lt;/value&gt; &lt;/property&gt; &lt;/bean&gt; --&gt; &lt;!-- &lt;broker xmlns="http://activemq.apache.org/schema/core" brokerName="{hostname}" dataDirectory="./activemq-data"&gt; --&gt; &lt;broker xmlns="http://activemq.apache.org/schema/core" brokerName="${COMPUTERNAME}" dataDirectory="./activemq-data"&gt; &lt;!-- Destination specific policies using destination names or wildcards --&gt; &lt;destinationPolicy&gt; &lt;policyMap&gt; &lt;policyEntries&gt; &lt;policyEntry queue="&gt;" memoryLimit="5mb"/&gt; &lt;policyEntry topic="&gt;" memoryLimit="5mb"&gt; &lt;!-- you can add other policies too such as these &lt;dispatchPolicy&gt; &lt;strictOrderDispatchPolicy/&gt; &lt;/dispatchPolicy&gt; &lt;subscriptionRecoveryPolicy&gt; &lt;lastImageSubscriptionRecoveryPolicy/&gt; &lt;/subscriptionRecoveryPolicy&gt; --&gt; &lt;/policyEntry&gt; &lt;/policyEntries&gt; &lt;/policyMap&gt; &lt;/destinationPolicy&gt; &lt;!-- Use the following to configure how ActiveMQ is exposed in JMX --&gt; &lt;!-- &lt;managementContext&gt; &lt;managementContext createConnector="true"/&gt; &lt;/managementContext&gt; --&gt; &lt;networkConnectors&gt; &lt;networkConnector uri="multicast://default?group=${groupId}"/&gt; &lt;/networkConnectors&gt; &lt;persistenceAdapter&gt; &lt;amqPersistenceAdapter syncOnWrite="false" directory="./activemq-data" maxFileLength="20 mb"/&gt; &lt;/persistenceAdapter&gt; ${sslContext} &lt;!-- The maximum about of space the broker will use before slowing down producers --&gt; &lt;systemUsage&gt; &lt;systemUsage&gt; &lt;memoryUsage&gt; &lt;memoryUsage limit="20 mb"/&gt; &lt;/memoryUsage&gt; &lt;storeUsage&gt; &lt;storeUsage limit="1 gb" name="foo"/&gt; &lt;/storeUsage&gt; &lt;tempUsage&gt; &lt;tempUsage limit="100 mb"/&gt; &lt;/tempUsage&gt; &lt;/systemUsage&gt; &lt;/systemUsage&gt; &lt;!-- The transport connectors ActiveMQ will listen to --&gt; &lt;transportConnectors&gt; &lt;transportConnector name="openwire" uri="${brokerURL}" discoveryUri="multicast://default?group=${groupId}" updateClusterClients="true" rebalanceClusterClients="true" updateClusterClientsOnRemove="true" /&gt; &lt;/transportConnectors&gt; &lt;/broker&gt; &lt;/beans:beans&gt; </code></pre> <p>And this is the maven filter being used:</p> <pre><code>brokerURL=tcp://0.0.0.0:61616 sslContext= groupId=0 </code></pre> <p>That's the last version we are using, if the client uses failover with direct ips it can connect to both of them, using discovery only one of the nodes (Windows XP) is found the other (Windows Server 2008) doesn't reply to the IGMP packet (all firewall disabled) and they don't connect to each other.</p> <p>One of the known problems is the brokerName as I have read <a href="http://activemq.2283324.n4.nabble.com/deployment-of-hundreds-of-client-broker-name-configuration-problem-td2353341.html" rel="nofollow">here</a> that it can has variables in it but that doesn't seem to work outside a maven deploy, but not sure if it is the our only error or there are more.</p> <p>I will add extra info if needed, just tell me.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload