Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 96907 invoked from network); 26 Sep 2007 19:56:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Sep 2007 19:56:18 -0000 Received: (qmail 4233 invoked by uid 500); 26 Sep 2007 19:56:08 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 4204 invoked by uid 500); 26 Sep 2007 19:56:08 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 4194 invoked by uid 99); 26 Sep 2007 19:56:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2007 12:56:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2007 19:56:09 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Iacz7-00084x-1f for users@activemq.apache.org; Wed, 26 Sep 2007 12:55:49 -0700 Message-ID: <12908636.post@talk.nabble.com> Date: Wed, 26 Sep 2007 12:55:49 -0700 (PDT) From: chago To: users@activemq.apache.org Subject: Re: Able to send message to ActiveMQ but Not getting reply to Client In-Reply-To: <12900021.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: nabble@visualxs.com References: <12553636.post@talk.nabble.com> <12881171.post@talk.nabble.com> <12893080.post@talk.nabble.com> <12899201.post@talk.nabble.com> <12900021.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org The polling begins as soon as the page is loaded and the _amq.js fle is processed. It is quite probable that their are no consumers at this time. A consumer isn't created until the amq.addListener() function is invoked. Can you post your code? -- jim JigarP wrote: > > Hi Chago, > I had checked out whole activemq +ajax forum and i had found the same > issue related question posted but they where not having any reply for > that. I think whn polling happens then it does not have any consumer so it > is not goin inside for loop itself. > > can you tell me if you can help me out for this. or suggest alternate > solution for this. > > J > > > chago wrote: >> >> Unfortunately, I am familiar only with the javascript client portion of >> the puzzle. The MessageListenerServlet itself is the entity that >> establishes the JMS connection with the broker. (Hope my terminology is >> correct there.) The servlet acts as a pass-through proxy to the >> javascript client. If you are seeing this servlet drop connections to the >> broker, it should show up using detailed logging. >> >> Which condition in doMessages is failing? >> - is there at least one consumer? >> - does consumer.getAvailableListener() return a value? >> >> In subversion, there doesn't appear to be many changes in the early part >> of the doMessages() method. Would you be able to include the >> avtivemq-web.jar file from the head in your project to replace the 4.x >> version. There may be other dependencies that prevent this, but I have >> never tried. >> >> -- jim >> >> -- jim >> >> >> JigarP wrote: >>> >>> Hi Chago/James, >>> >>> you are right. I had same problem and because of this i am not able >>> to use latest tech. provided by Activemq and jetty(Continuation). I am >>> facing only one issue that is whenever client do polling that time i am >>> not getting any consumer for that client so even if we have data in the >>> Activemq we are not able to get it. >>> >>> Below is my observation. >>> >>> we found that activemq is having all the messages but AjaxServlet is not >>> able to get because whenever we do polling from client then it checks >>> for below condition in the >>> >>> >>> MessageListenerServlet.java class(inside activemq-web.jar) which is >>> having below implementation. >>> >>> >>> //inside >>> doMessages method >>> >>> for (int i = 0; message == null && i < >>> consumers.size(); i++) { >>> consumer = (MessageAvailableConsumer)consumers.get(i); >>> >>> if (consumer.getAvailableListener() == null) { >>> continue; >>> >>> } >>> >>> >>> // Look for any available messages >>> >>> message = consumer.receiveNoWait(); >>> if (LOG.isDebugEnabled()) { >>> >>> LOG.debug("received " + message + " from " + >>> consumer); >>> >>> } >>> } >>> >>> >>> above implementation will read message from activemq for corresponding >>> consumer. but we found that >>> we are not having any consumer related to client so even if we have data >>> in the activemq we are not >>> able to send that data back to client. >>> >>> >>> I dont know how to keep live consumer so that we can execute above logic >>> and we can get messages. >>> >>> is this bug or do i need more configuration to resolve this isssue. >>> >>> >>> >>> J >>> >>> chago wrote: >>>> >>>> I know others that have had this problem running with the 4.1.x series. >>>> Is that the case for you? >>>> >>>> -- jim >>>> >>>> >>>> JigarP wrote: >>>>> >>>>> Hi , >>>>> >>>>> I am using ActiveMQ/AJAX for my web based application. I have >>>>> integrated ajax successfully in my application but getting below issue >>>>> sometime. >>>>> >>>>> 1) I send message to MQ but not getting reply to client browser but >>>>> other browsers are getting reply who are registered for same topic. >>>>> >>>>> 2) is there any way to check whether our listener is listening to >>>>> topic?if not connected so we can retry and connect so we will not miss >>>>> any message. >>>>> >>>>> 3) i am not able to make stable my application because of above >>>>> issue. can you suggest some technique for ajax with activemq so i can >>>>> try out. >>>>> >>>>> awaiting your reply, >>>>> >>>>> Jigar >>>>> >>>> >>>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Able-to-send-message-to-ActiveMQ-but-Not-getting-reply-to-Client-tf4400842s2354.html#a12908636 Sent from the ActiveMQ - User mailing list archive at Nabble.com.