1、生产者
public static void main(String[] args) throws JMSException {
ConnectionFactory conn=new ActiveMQConnectionFactory(ActiveMQConnectionFactory.DEFAULT_USER,
ActiveMQConnectionFactory.DEFAULT_PASSWORD,
"failover:(tcp://10.18.1.138:61616,tcp://10.18.1.139:61617)?randomize=false"