Just to share my knowledge to answer your questions:
Q1: How to configure Active MQ on the load balance domain name?
A1:
We could set up a different way of clustering setup for HA.
We did use the broker clustering - Shared File System Master Slave set up for failover. For this setup Load balance setup not required.
Broker clusters:
The most common mental model of clustering in a JMS context is that there is a collection of JMS brokers and a JMS client will connect to one of them; then if the JMS broker goes down, it will auto-reconnect to another broker.
We implement this using the failover:// protocol in the JMS client. See the Failover Transport Reference page for details of how to configure the failover protocol.
This setup needs at least 3 nodes (or some odd number) to avoid issues with split brain during network partitions.
It needs shared network storage to persist the messages.
Install the ActiveMQ and configure the activemq.xml to a shared directory, ensure all the broker this config points to the same shared directory folder.
<persistenceAdapter>
<kahaDB directory="${activemq.data}/kahadb"/>
</persistenceAdapter>
ActiveMQ maintains information about schedules independent to the settings in the persistence adapter. With a shared file-system it is therefore important to tell ActiveMQ expressly where to store scheduler information. To do this, set the dataDirectory attribute on the broker, for example:
<broker xmlns="http://activemq.apache.org/schema/core"
dataDirectory="/some/location"
brokerName="mmuserb2" useJmx="true" advisorySupport="false"
persistent="true" deleteAllMessagesOnStartup="false"
useShutdownHook="false" schedulerSupport="true">
In the deployer and content services in cd_storage_conf.xml for clients should be using the Failover Transport to connect to the available brokers, for example:
<RemoteSynchronization>
<Connector Class="com.tridion.cache.JMSCacheChannelConnector" Topic="Tridion">
<JndiContext>
<Property Name="java.naming.factory.initial" Value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
<Property Name="java.naming.provider.url" Value="failover:(tcp://broker1-ipaddress-or-hostname,tcp://broker2-ipaddress-or-hostname:61616,tcp://broker3-ipaddress-or-hostname:61616)?randomize=false&timeout=5000"/>
<Property Name="topic.Tridion" Value="Tridion-Live"/>
</JndiContext>
</Connector>
</RemoteSynchronization>
Q2: Do we need to load balance 61616 port on the servers? is this correct?
A2: No and No
Q3: tcp://servername:61616 - is not accessible outside the server? shall I open up a firewall on the server to make it accessible?
A3: If you use to invalidate the caching in content-service, then yes ensure deployer and content services servers should have access to ActiveMQ servers on that port 61616.
Q3: Can I replace "tcp" with "http" to make it accessible and load balanced? will invalidation works post replacing "tcp" with "http".
A3: No and No
Supported and available different ActiveMQ TransportConnectors:
openwire: tcp://0.0.0.0:61616
amqp: amqp://0.0.0.0:5672
stomp: stomp://0.0.0.0:61613
mqtt: mqtt://0.0.0.0:1883
ws: ws://0.0.0.0:61614
Note:
Pros: Run as many slaves as required. Automatic recovery of old masters
Cons: Requires shared file system
I hope it helps.