---
title: "ActiveMQ stop inactivity read check"
author: "loving863"
date: "2008-09-17T16:01:57Z"
tags: ["ActiveMQ", "Apache"]
slug: "activemq-stop-inactivity-read-check"
draft: false
lastmod: "2008-09-17T16:01:57Z"
id: 243153
url: "https://jinguo.iteye.com/blog/243153"
---

You can do the following to fix the issues:

1\) Append max inactivity duration to your Uri in the format below: wireFormat.maxInactivityDuration=0

2\) Use the same Uri at the client side as well as at the server side

Regards,

如果不这样设置，对应的错误会出现：  
2008-05-07 09:22:56,343 \[org.apache.activemq.ActiveMQConnection]-\[WARN] Async exception with no exception listener: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long: localhost/127.0.0.1:61616  
org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long: localhost/127.0.0.1:61616

 

 

ActiveMQ的tcp url：tcp://localhost:61616后面要加入?wireFormat.maxInactivityDuration=0 这样的参数，否则当一段时间没有消息发送时会抛出 "Channel was inactive for too long"异常2008-06-17 17:22 通过网页