On Fri, 2010-05-28 at 12:27 +0200, Frank Gynnild wrote: > Hi everyone! > > I've been using ActiveMQ for some time, but have run into several issues > lately which I haven't been able to figure out what is causing them. > I use the NMS Client Library from C# using version 5.3.0 of ActiveMQ, but > have also tried using version 5.3.2. I am also using the latest > versions of the NMS client libraries (Apache.NMS.ActiveMQ.dll + > Apache.NMS.dll). I'm using persistent queues, without producer flow control > disabled. The prefetch is set to 1 and auto acknowledge. >
What version of NMS are you using? The latest is v1.3.0 and is recommended that you switch to that if you aren't using it already. > The first problem is that from a producer, the send method can sometimes > block indefinitely. Similar, when trying to stop > the program, it blocks when trying to close the connection. If you have producer flow control enabled then this is not unusual if you are producing to a Queue with no consumer. > > Sometimes I also get this error "Apache.NMS.ActiveMQ.IOException: Channel > was inactive for too long: tcp:// > 127.0.0.1:61616/?nms.PrefetchPolicy.queuePrefetch=1&wireFormat.MaxInactivityDuration=0 > ". > I saw on the mailing list that setting the > "wireFormat.MaxInactivityDuration=0" > would deal with this situation, but it didn't remedy this situation. > > The connection and the session objects are used for a long time. Is there > any guidance for how long a connection and session should be used? > I also tried using the failover which just one address, like this: > "failover:(tcp:// > 127.0.0.1:61616?nms.PrefetchPolicy.queuePrefetch=1&wireFormat.MaxInactivityDuration=0)", > but then it gave > me some other issues, the number of threads started to spin up. Can the same > connection and session be used over several threads? There shouldn't be any issues with running for long periods of time. > > Anything that could shed some light on these issues would be very welcome. > > Thanks, > Frank Regards -- Tim Bish Open Source Integration: http://fusesource.com ActiveMQ in Action: http://www.manning.com/snyder/ Follow me on Twitter: http://twitter.com/tabish121 My Blog: http://timbish.blogspot.com/