Author |
Message
|
bower5932 |
Posted: Tue Apr 19, 2005 6:47 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I would have also thought that the broker would have cleared the active subscriber once it realized that it was no longer there. How is your subscriber connecting into WMQ - client or bindings? How long had you waited when you saw this error? Is it possible that you didn't wait long enough for the broker to do its cleanup? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 19, 2005 6:59 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I don't believe that durable subscribers get cleaned up except programmatically/manually.
Using Java wrote: |
JMS provides two types of subscribers:
Non-durable subscribers
These subscribers receive messages on their chosen topic, only if the messages are published while the subscriber is active.
Durable subscribers
These subscribers receive all the messages published on a topic, including those that are published while the subscriber is inactive. |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
adoyle65 |
Posted: Tue Apr 19, 2005 7:36 am Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hi,
So if I understand this correctly. If our app crashes there is no way to cleanup the subscription registration for a durable subscriber, which is what we have. If the app exits gracefully we can clean up the subscription programatically.
Thanks |
|
Back to top |
|
 |
adoyle65 |
Posted: Tue Apr 19, 2005 7:43 am Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hi bower5932,
We use client bindings as far as I know. We have waited hours before trying to reconnect and we still get the error. I would have thought that would be sufficient. Are there any settings on the broker that we can configure via the control center to control this?
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 19, 2005 7:51 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
adoyle65 wrote: |
So if I understand this correctly. If our app crashes there is no way to cleanup the subscription registration for a durable subscriber, which is what we have. |
http://www.developer.ibm.com/tech/sampmq.html wrote: |
Sample Java program to show how orphaned subscription registrations can be removed from the Pub/Sub broker (SupportPac ma0c) (Unsubscribe.java) |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Apr 19, 2005 8:27 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I think 'cleaned up' may have been the wrong choice of words. I wasn't trying to imply that the subscriber would be deregistered. I was trying to imply that if the subscriber crashed, then his active connection to the qmgr would eventually time-out. Once it did, you'd be able to connect again without getting the 'subscriber in use' error.
Since adoyle65 is using durable subscribers, the dumpbroker program will dump a list of his subscribers and he should certainly see one for the subscriber that is in use. |
|
Back to top |
|
 |
adoyle65 |
Posted: Tue Apr 19, 2005 11:14 am Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hi All,
So what you guys are saying is that if we recycle are app or it crashes at any point we have to manually clear out any existing subscription registrations for durable subscribers?
Thanks again |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Apr 19, 2005 11:22 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
If the subscribers are durable, then I would guess that you would never clear them out manually when your app crashes or you restart your server. Durable subscriptions are supposed to stay subscribed while the subscriber is not active so that it can get all of the published messages while it was away. If you are in a position to just deregister these subscribers, it sounds like you might really want to use non-durable subscribers. These subscribers only receive messages while they are connected and they are cleaned-up automatically if you forget to deregister. |
|
Back to top |
|
 |
adoyle65 |
Posted: Tue Apr 19, 2005 11:44 am Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hi again,
How do I get around the app trying to subscribe again when we bring it back up? We do not wish to lose any messages sent while we were inactive?
Thanks |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Apr 19, 2005 1:43 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I don't think that your problem is subscribing again as much as it is trying to connect while you still have an active connection. Can you post the exact error message that you are getting here?
As far as a durable subscriber is concerned, there are a couple of samples (mqjmspub, mqjmssub) at:
http://www.developer.ibm.com/tech/sampmq.html
The mqjmssub program allows you to indicate that the subscriber is durable. You can then shut it down and restart it without any problems. You might want to look at it to see if you are doing anything strange. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Apr 19, 2005 5:20 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
As well check any channel and queue status if you are using client connection for the subscribers or queue status if you are using bindings.
This should tell you whether the qmgr thinks you still have a handle on the queue.
Enjoy  |
|
Back to top |
|
 |
adoyle65 |
Posted: Wed Apr 20, 2005 5:17 am Post subject: |
|
|
Apprentice
Joined: 18 Feb 2004 Posts: 37 Location: Canada
|
Hi,
Here is the exact error is the System.Out log.
Once again guys thanks for all the suggestions so far.
[4/20/05 8:30:07:742 EDT] 4c94d550 ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource JMS$TopicConnectionFactory$JMSManagedConnection@1124455701. The exception which was received is javax.jms.JMSException: MQJMS3023: Subscription has an active TopicSubscriber
Thanks |
|
Back to top |
|
 |
Henry |
Posted: Thu Apr 21, 2005 5:51 pm Post subject: |
|
|
Acolyte
Joined: 08 Oct 2003 Posts: 73
|
Hi All,
I want to ask a question that a little bit off the topic. However, it is nearly under the same environment so I just put my question here.
I have got a Window machine used as a app server and web server(WAS) and MQ manager and broker are running on a UNIX machine. There are three options in WAS to setup the JMS setting.
1 - Generic JMS Provider
2 - WebSphere JMS Provider
3 - WebSphere MQ JMS Provider
Which one should I choose? Also, there is a JMSAdmin function on MQ server to config the JMS Objects. Is it be used to define the JMS Object on MQ? If the setup on WAS is used, is it still be used?
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 21, 2005 8:45 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
adoyle65 wrote: |
Hi,
Here is the exact error is the System.Out log.
Once again guys thanks for all the suggestions so far.
[4/20/05 8:30:07:742 EDT] 4c94d550 ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource JMS$TopicConnectionFactory$JMSManagedConnection@1124455701. The exception which was received is javax.jms.JMSException: MQJMS3023: Subscription has an active TopicSubscriber
Thanks |
Any linked exception with Return Code and Reason Code ??
 |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 21, 2005 8:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Henry wrote: |
Hi All,
I want to ask a question that a little bit off the topic. However, it is nearly under the same environment so I just put my question here.
I have got a Window machine used as a app server and web server(WAS) and MQ manager and broker are running on a UNIX machine. There are three options in WAS to setup the JMS setting.
1 - Generic JMS Provider
2 - WebSphere JMS Provider
3 - WebSphere MQ JMS Provider
Which one should I choose? Also, there is a JMSAdmin function on MQ server to config the JMS Objects. Is it be used to define the JMS Object on MQ? If the setup on WAS is used, is it still be used?
Thanks |
Looks like you want to setup #3: WebSphere MQ JMS Provider
You can use #1 if you use a file context
You can use #2 for the embedded MQ server
You should use #3 with WebSphere MQ
Make sure you define your variables as explained in the configuration console (path + classpath).
 |
|
Back to top |
|
 |
|