Problem in using Durable Subscribers(JMS with JBoss)
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   issac_abbas
Posted On:   Tuesday, August 20, 2002 11:09 PM

I am facing a strange problem. I am using JBoss App Server as JMS provider. I have a client which is nothing but a durable subscriber(consumer). I am registering the client with a client ID that is generated dynamically everytime the client comes up. Also the consumer has some message selectors. Assume this client is not running and any other client is publishing message for this clinet. When this durable subscriber client comes up, it is not receiving the message. If the client is active when the message is published, it is receiving and processing the message( It is behaving like a non-durable subscriber). I don't know why this problem is happening. Does it have something to do with client ID?? Any help in this regard will be highly appreciated. You can also reac   More>>

I am facing a strange problem. I am using JBoss App Server as JMS provider. I have a client which is nothing but a durable subscriber(consumer). I am registering the client with a client ID that is generated dynamically everytime the client comes up. Also the consumer has some message selectors. Assume this client is not running and any other client is publishing message for this clinet. When this durable subscriber client comes up, it is not receiving the message. If the client is active when the message is published, it is receiving and processing the message( It is behaving like a non-durable subscriber). I don't know why this problem is happening. Does it have something to do with client ID?? Any help in this regard will be highly appreciated. You can also reach me through my mail id ( issac.abbas@wipro.com).
Thanx

   <<Less

Re: Problem in using Durable Subscribers(JMS with JBoss)

Posted By:   Laurent_Mihalkovic  
Posted On:   Friday, September 6, 2002 12:46 AM

An additional note... New commers to JMS tend to confuse 'durable subscription' with 'durable publication'. JMS is built around the first one (the subscription takes effect for all the messages published after the registration), while you were describing what i call 'durable publication': the server would keep all published messages for the hypothetical case where someone might want to read them at a later date. This is not part of JMS as of today.

hope that helps
laurent

Re: Problem in using Durable Subscribers(JMS with JBoss)

Posted By:   Laurent_Mihalkovic  
Posted On:   Friday, September 6, 2002 12:41 AM

As Rene pointed out, from the server's perspective, a durable subscription is simply a registered clientID. With a list of clientIDs, the server is able to build a list of available messageIDs and compare this to the list of messageIDs that have been read. So for your messages to be read, you need several factors:

  • the clientID must be registered before the message is sent. the durable subscription takes effect after the ClientID has been added to the server.
  • the client must use the same id to allow the server to pick-up the subscription where it left it before

So, what you are experiencing is absolutely normal behavior for the conditions in which you are using JMS.

cheers
laurent

Re: Problem in using Durable Subscribers(JMS with JBoss)

Posted By:   Rene_Mischak  
Posted On:   Thursday, August 22, 2002 09:48 AM

Try a constant Client id.

JBossMQ associates any unsent message with the clientId and send it when the client reconnects with the same clientId. JBossMQ recognizes the client by its clientId, so it should have no knowledge, that a new client with another Id (which is in your case the same) has missed any messages due to a downtime.



Hope it is right. Tell me if it worked.


René
About | Sitemap | Contact