activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JigarP <jigar.prajap...@gmail.com>
Subject Re: Able to send message to ActiveMQ but Not getting reply to Client
Date Wed, 26 Sep 2007 02:59:57 GMT

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#a12893080
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message