git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Artemis 2.5.0] config to duplicate clustered-static-discovery example on EC2


Hi there,

This example works just fine on your local:
apache-artemis-2.5.0/examples/features/clustered/clustered-static-discovery

On AWS EC2 in a VPC it does not (with my config at least) even when watered
down to a 2 node cluster.

If anyone has ever been able to duplicate that clustered-static-discovery
example (naturally with connections round robened to servers in the cluster
and STRICT load balancing taking place) please can you share your work.

My config is as follows and note  the connection factory was set up like so
...

*ConnectionFactory cf0 = new
ActiveMQConnectionFactory("tcp://server0.makaro.io:61616");*

I'll be getting my debugger out next, but was hoping that someone has done
this before me with Artemis 2.5.0 (googling has not yielded results).

*ec2-user@server0 ~]$ cat server0/etc/broker.xml*
<?xml version='1.0'?>

<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
               xmlns:xi="http://www.w3.org/2001/XInclude";
               xsi:schemaLocation="urn:activemq
/schema/artemis-configuration.xsd">

   <core xmlns="urn:activemq:core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="urn:activemq:core ">

      <name>server0.makaro.io</name>
      <persistence-enabled>true</persistence-enabled>

      <journal-type>ASYNCIO</journal-type>
      <paging-directory>./data/paging</paging-directory>
      <bindings-directory>./data/bindings</bindings-directory>
      <journal-directory>./data/journal</journal-directory>
     
<large-messages-directory>./data/large-messages</large-messages-directory>
      <journal-datasync>true</journal-datasync>
      <journal-min-files>2</journal-min-files>
      <journal-pool-files>10</journal-pool-files>
      <journal-file-size>10M</journal-file-size>

    <connectors>
	    
         <connector
name="server1-connector">tcp://172.31.6.91:61616</connector>
        
        <connector name="artemis">tcp://server0.makaro.io:61616</connector>
    </connectors>

      
      <disk-scan-period>5000</disk-scan-period>

      
      <max-disk-usage>90</max-disk-usage>

      
      <critical-analyzer>true</critical-analyzer>

      <critical-analyzer-timeout>120000</critical-analyzer-timeout>

      <critical-analyzer-check-period>60000</critical-analyzer-check-period>

      <critical-analyzer-policy>HALT</critical-analyzer-policy>

      <acceptors>

         
         <acceptor
name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor>

         
         <acceptor
name="amqp">tcp://0.0.0.0:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpMinCredits=300</acceptor>

         
         <acceptor
name="stomp">tcp://0.0.0.0:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true</acceptor>

         
         <acceptor
name="hornetq">tcp://0.0.0.0:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true</acceptor>

         
         <acceptor
name="mqtt">tcp://0.0.0.0:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true</acceptor>

      </acceptors>

      <cluster-user>foo</cluster-user>

      <cluster-password>bar</cluster-password>

	<cluster-connections>
         <cluster-connection name="my-cluster">
            <connector-ref>artemis</connector-ref>
            <retry-interval>500</retry-interval>
            <use-duplicate-detection>true</use-duplicate-detection>
            <message-load-balancing>STRICT</message-load-balancing>
            <max-hops>1</max-hops>
            <static-connectors>
               <connector-ref>server1-connector</connector-ref>
            </static-connectors>
         </cluster-connection>
      </cluster-connections>


      <security-settings>
         <security-setting match="#">
            <permission type="createNonDurableQueue" roles="guest"/>
            <permission type="deleteNonDurableQueue" roles="guest"/>
            <permission type="createDurableQueue" roles="guest"/>
            <permission type="deleteDurableQueue" roles="guest"/>
            <permission type="createAddress" roles="guest"/>
            <permission type="deleteAddress" roles="guest"/>
            <permission type="consume" roles="guest"/>
            <permission type="browse" roles="guest"/>
            <permission type="send" roles="guest"/>
            
            <permission type="manage" roles="guest"/>
         </security-setting>
      </security-settings>

      <address-settings>
         
         <address-setting match="activemq.management#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            
            <max-size-bytes>-1</max-size-bytes>
           
<message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
         
         <address-setting match="#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            
            <max-size-bytes>-1</max-size-bytes>
           
<message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
      </address-settings>

      <addresses>
         <address name="DLQ">
            <anycast>
               <queue name="DLQ" />
            </anycast>
         </address>
         <address name="ExpiryQueue">
            <anycast>
               <queue name="ExpiryQueue" />
            </anycast>
         </address>
         <address name="exampleQueue">
            <anycast>
               <queue name="exampleQueue"/>
            </anycast>
         </address>
      </addresses>

   </core>
</configuration>

*[ec2-user@server1 ~]$ cat server1/etc/broker.xml*
<?xml version='1.0'?>

<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
               xmlns:xi="http://www.w3.org/2001/XInclude";
               xsi:schemaLocation="urn:activemq
/schema/artemis-configuration.xsd">

   <core xmlns="urn:activemq:core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="urn:activemq:core ">

      <name>server1.makaro.io</name>
      <persistence-enabled>true</persistence-enabled>

      <journal-type>ASYNCIO</journal-type>
      <paging-directory>./data/paging</paging-directory>
      <bindings-directory>./data/bindings</bindings-directory>
      <journal-directory>./data/journal</journal-directory>
     
<large-messages-directory>./data/large-messages</large-messages-directory>
      <journal-datasync>true</journal-datasync>
      <journal-min-files>2</journal-min-files>
      <journal-pool-files>10</journal-pool-files>
      <journal-file-size>10M</journal-file-size>
    
    <connectors>
	    
         <connector
name="server0-connector">tcp://172.31.14.235:61616</connector>
        
        <connector name="artemis">tcp://server1.makaro.io:61616</connector>
    </connectors>

      
      <disk-scan-period>5000</disk-scan-period>

      
      <max-disk-usage>90</max-disk-usage>

      
      <critical-analyzer>true</critical-analyzer>

      <critical-analyzer-timeout>120000</critical-analyzer-timeout>

      <critical-analyzer-check-period>60000</critical-analyzer-check-period>

      <critical-analyzer-policy>HALT</critical-analyzer-policy>

      <acceptors>

         
         <acceptor
name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor>

         
         <acceptor
name="amqp">tcp://0.0.0.0:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpMinCredits=300</acceptor>

         
         <acceptor
name="stomp">tcp://0.0.0.0:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true</acceptor>

         
         <acceptor
name="hornetq">tcp://0.0.0.0:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true</acceptor>

         
         <acceptor
name="mqtt">tcp://0.0.0.0:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true</acceptor>

      </acceptors>

      <cluster-user>foo</cluster-user>
      <cluster-password>bar</cluster-password>

      <cluster-connections>
         <cluster-connection name="my-cluster">
            <connector-ref>artemis</connector-ref>
            <retry-interval>500</retry-interval>
            <use-duplicate-detection>true</use-duplicate-detection>
            <message-load-balancing>STRICT</message-load-balancing>
            <max-hops>1</max-hops>
            <static-connectors>
               <connector-ref>server0-connector</connector-ref>
            </static-connectors>
         </cluster-connection>
      </cluster-connections>

      <security-settings>
         <security-setting match="#">
            <permission type="createNonDurableQueue" roles="guest"/>
            <permission type="deleteNonDurableQueue" roles="guest"/>
            <permission type="createDurableQueue" roles="guest"/>
            <permission type="deleteDurableQueue" roles="guest"/>
            <permission type="createAddress" roles="guest"/>
            <permission type="deleteAddress" roles="guest"/>
            <permission type="consume" roles="guest"/>
            <permission type="browse" roles="guest"/>
            <permission type="send" roles="guest"/>
            
            <permission type="manage" roles="guest"/>
         </security-setting>
      </security-settings>

      <address-settings>
         
         <address-setting match="activemq.management#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            
            <max-size-bytes>-1</max-size-bytes>
           
<message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
         
         <address-setting match="#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            
            <max-size-bytes>-1</max-size-bytes>
           
<message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
      </address-settings>

      <addresses>
         <address name="DLQ">
            <anycast>
               <queue name="DLQ" />
            </anycast>
         </address>
         <address name="ExpiryQueue">
            <anycast>
               <queue name="ExpiryQueue" />
            </anycast>
         </address>
         <address name="exampleQueue">
            <anycast>
               <queue name="exampleQueue"/>
            </anycast>
         </address>
      </addresses>

   </core>
</configuration>

Thanks,
Nico



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html



( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-activemq-users/msg03600.html on line 419
Call Stack
#TimeMemoryFunctionLocation
10.0008381016{main}( ).../msg03600.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-activemq-users/msg03600.html on line 419
Call Stack
#TimeMemoryFunctionLocation
10.0008381016{main}( ).../msg03600.html:0