使用ActiveMQ,为了测试拔掉了网线,就出来如下异常 此后程序就堵塞在producer.send(msg); 这里 此后程序才能继续跑下去 想让能在网线拔掉的状态下,生产者能继续发消息 不知道这个异常是怎么产生的 |
|
不知道是不是我的配置有问题?
启动时的输出是这样: Msg Broker url=tcp://211.69.207.52:61616 – JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi – PListStore:[D:\Java Workspace\OSGiConfig\activemq-data\localhost\tmp_storage] started – Using Persistence Adapter: KahaDBPersistenceAdapter[D:\Java Workspace\OSGiConfig\activemq-data\localhost\KahaDB] – KahaDB is version 4 – Recovering from the journal … – Recovery replayed 5 operations from the journal in 0.0 seconds. – Apache ActiveMQ 5.7.0 (localhost, ID:penguin-4482-1409623892703-0:1) is starting – Listening for connections at: tcp://penguin:61616 – Connector tcp://penguin:61616 Started – Apache ActiveMQ 5.7.0 (localhost, ID:penguin-4482-1409623892703-0:1) started – For help or more information please see: http://activemq.apache.org – Store limit is 102400 mb, whilst the data directory: D:\Java Workspace\OSGiConfig\activemq-data\localhost\KahaDB only has 34421 mb of usable space – Temporary Store limit is 51200 mb, whilst the temporary data directory: D:\Java Workspace\OSGiConfig\activemq-data\localhost\tmp_storage only has 34421 mb of usable space Message broker started …. – Successfully connected to tcp://211.69.207.52:61616 |
|
40分 |
你应该设置持久化订阅了吧。有没有这句设置setDeliveryMode(DeliveryMode.PERSISTENT);
|
我比较怀疑是内存的问题 而出错的电脑是输出是: 应该是这么个问题吧? |
|
折腾了这么久,原来是因为win7和XP系统有点区别。
xp下地址写为localhost,拔掉网线后也能在本机通信了 |
|
就你一个回了,虽然是自己解决了 |