ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Pub/Sub configuration question...URGENT!!

Post new topic  Reply to topic
 Pub/Sub configuration question...URGENT!! « View previous topic :: View next topic » 
Author Message
mqusr001
PostPosted: Tue Jul 06, 2004 3:54 pm    Post subject: Pub/Sub configuration question...URGENT!! Reply with quote

Newbie

Joined: 06 Jul 2004
Posts: 3

Hi

I'm new to pub/sub and JMS. I have installed MA0C support pac. Our application has a publisher ( we use openadaptor for this) that will publish a message to the topic. we use SYSTEM.BROKER.DEFAULT.STREAM for receiving the publications. As subscriber, again we have configured openadaptor tool to read from the topic Q.

The issue is: If the subscriber is not active at the time of publication, the msgs are getting lost. I need to acheive durable subscriptions. But I am not able to figure out how to do this. Can we do this with JMSAdmin itself (in our application, design is such that we dont have any code to publish/read from topic Qs, we acheive this through configuring openadaptor tool). Please help me with how i can do this.

Please tell me ideally, if the subscriber is not active at the time of publication, where will the message be? Will it be in SYSTEM.BROKER.DEFAULT.STREAM or in the topic Q. Both these queues are declared to be persistent.

Please correct me if i'm wrong. I have not registered publisher/subscriber explicitly. I read that at the time of first publication publisher will automatically be registered and subscriber willl be registered when an application reads the topic Q for the first time. Otherwise to make the broker, to pass the message from stream Q to topic Q, is there any configuration to be made (other than having a TCF and Topic defnitions)?

I am using MQ 5.2 on AIX with MA0C support pac.

I am struggling very much on this and any help would be greatly appreciated.

regards
Tim
Back to top
View user's profile Send private message
bower5932
PostPosted: Wed Jul 07, 2004 6:47 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If you are using MQ 5.2, I'd suggest that you upgrade.

There are a couple of sample programs out at:

http://www.developer.ibm.com/tech/sampmq.html

They are called mqjmspub.java and mqjmssub.java. The subscriber can be run as either durable or non-durable by specifying a switch. You might want to check it out.

As far as where are the messages held, they are held by the subscribers. When you publish a message, it is put onto the queue of the subscribers. If this is a durable subscriber, then it will be there when the subscriber comes back. If it is a non-durable subscriber, then it gets put on the queue while the subscriber is active. When the subscriber goes away, so does the subscription.

Try looking at the programs. You can run them on your system and I think they'll give you a better feel for what is going on.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
mqusr001
PostPosted: Wed Jul 07, 2004 12:40 pm    Post subject: Pub/Sub configuration question...URGENT!! Reply with quote

Newbie

Joined: 06 Jul 2004
Posts: 3

Hi

Thanks for the response. I will certainly go through the code and try the samples. I got the concept of durable and non-durable subscriptions now.

We are actually using a tool called openadaptor for publishing and retrieving the message to & from topcis. I was struggling to configure an adaptor to function as durable subscriber.

I figured out how to create a durable subscriber and now even when the subscribing adaptor is down, the published message gets into the topic Q, and once subscribing adaptor comes up, it is able to read the message. This I could do by setting ClientID, Subscription Name properties in the subscribing adaptor.

I have yet another query. Is it required to set the ClientID property in the publisher also?? If so, it cannot be same as the value, the subscribing component sets. Am I right here?? Because, if I set clientID property in publishing adaptor, to the value set by subscribing adaptor, and if I try to run both of them, I get an exception while starting subscribing adaptor:

connect() failed with
JMSException: com.ibm.mq.jms.BrokerCommandFailedException: Broker command
failed: MQRCCF_SUBSCRIPTION_LOCKED Reason code 3156]

Please clarify this...any help on this would be greatly appreciated.

regards
Tim
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Pub/Sub configuration question...URGENT!!
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.