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 12:37:03 GMT

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


Mime
View raw message