Thanks for your input on this. I am using the latest 1.2.0 build, so I will
try to switch to the 1.3.0 instead.
Looking at the JMS specification gave me the answers on concurrency. I guess
this is old news
for the rest of you, but in short - connections can be shared among threads,
but session, producers and
consumers must not be shared. What strategy is the best to use when
implementing? How "cheap" is it to create local session,
producers and consumers for each thread vs using synchronization to create
thread safe sessions?

Actually I've turned off the producer flow control, so the blocking behavior
puzzles
me. It only seem to happen on the response side, when using the
request/response
pattern. For instance, once process sends a request, the other process gets
the requests,
and try to send a response back. But it blocks on the send. The same process
gets
into trouble when trying to exit it, because then it blocks when trying to
stop the connection.
Anyone know what I am doing wrong?

Kindly thanks for all help,
Frank

On Fri, May 28, 2010 at 2:47 PM, Timothy Bish <tabish...@gmail.com> wrote:

> 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/
>
>

Reply via email to