客户端监控连接ActiveMQ状态

1、spring配置文件中配置exceptionListener

class="org.springframework.jms.listener.DefaultMessageListenerContainer">

2、创建TempExceptionListener实现javax.jms.ExceptionListener接口

@Override

    public void onException(JMSException e) {

        LOG.error("TempExceptionListener 收到消息:" + e);

        LOG.warn("发送监控告警~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");

        

    }

你可能感兴趣的:(activemq)