qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Sobjak <wsobj...@gmail.com>
Subject Re: java qpid session issues
Date Thu, 28 May 2009 02:09:42 GMT
Thanks for the reply.
Ah, I did not know that was not JMS compliant; that being said, this test
case works against every JMS implementation I've tried it against.  When I
fix the ordering, it works as expected.

This was with the QPID Java Client with the QPID Java Broker.  The QPID CPP
client appears to handle this.  This is with Sun's Java6 implementation on
Fedora9.  I believe I also tried this with Sun's Java5 and JRockit's Java5.


On Fri, May 22, 2009 at 9:01 AM, Martin Ritchie <ritchiem@apache.org> wrote:

> 2009/5/13 Walter Sobjak <wsobjack@gmail.com>:
> > Hello
> >
> > I believe I may have uncovered a possible concurrency issue with the way
> > the Java Broker and/or Client works.  It appears if a message consumer
> > is awaiting a message in receive() before its connection is started, it
> > is never able to pull from its queue.
> >
> > I have attached a sample bit of code that hopefully displays this.  In
> > it, I create a temp queue and consumer from a session.  Then I create a
> > sub-thread that creates a producer, sends a message, then tries to
> > manually have the consumer pull from that queue using cons.receive().
> >
> > I start the thread, sleep for 2s, and then start the connection.  The
> > consumer hangs while trying to receive the message.  According to JMX,
> > the temp queue I create has both a consumer and a message before I start
> > the sub-thread.
> >
> > This is against the M4 versions of the Java Broker and client; I have
> > also tried the first 0.5 release candidate.
> >
> > Thanks
> >
> > WS
> >
> >
> >
> > ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project:      http://qpid.apache.org
> > Use/Interact: mailto:users-subscribe@qpid.apache.org
> >
>
> I shall try and find some time to run your test case however what you
> are doing is not JMS compliant.
>
> You should start the connection BEFORE attempting to call receive().
>
> That said I'll need to run your test app to see what is gong on as I
> would have thought that starting afterwards should work.
>
> Were you using the matching Java broker in your test? Not that it
> should matter but just so that I can reproduce more accurately what
> you are doing.
>
> Also just in case it matters what JVM and OS are you using?
>
> Cheers
>
> Martin
>
>
>
> --
> Martin Ritchie
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message