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 checking the depth of topics

Post new topic  Reply to topic
 pub/sub checking the depth of topics « View previous topic :: View next topic » 
Author Message
Vin
PostPosted: Tue Feb 22, 2005 6:35 am    Post subject: pub/sub checking the depth of topics Reply with quote

Master

Joined: 25 Mar 2002
Posts: 212
Location: India

Just started of implementing a pub/sub solution and have a few questions.

1) Since the topics are not physical in MQSeries are they persistent? when mqseries goes down and comes back up will the topics retain all the messages that were on them before the server went down

2) How can check the depth of an MQSeries topic, is there some sample script/program to do this


Trying to get the concepts straight here.

Appreciate all your responses
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Feb 22, 2005 7:00 am    Post subject: Re: pub/sub checking the depth of topics Reply with quote

Jedi Knight

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

Vin wrote:
Since the topics are not physical in MQSeries are they persistent? when mqseries goes down and comes back up will the topics retain all the messages that were on them before the server went down

I would have said that the 'topics' don't really exist as such. What exists is the message that was published/subscribed on a particular topic. If you are using persistent messages, then your subscribers will be able to get their messages when the server comes back up.
Quote:
How can check the depth of an MQSeries topic, is there some sample script/program to do this

Topics don't really have a depth. The queue that the subscriber will get its messages from has a depth. You could look at this queue to see how many messages are waiting to be picked up.

And hopefully not to cloud the issue, you'll need to consider durable vs. non-durable subscribers. Durable subscribers can go away and come back later to get publications issued while they were gone. Non-durable only get the publications while they are active.

It is also possible to have several subscribers share a single queue so you can't always tell by the queue depth how many messages or subscribers are out there.

There are some jms samples out at:

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

They are called mqjmspub.java and mqjmssub.java. You might find them useful. There are also a couple of administrative-type samples out there as welll. Dumpbroker dumps subscription information. Unsubscribe allows you to unsubscribe durable subscribers that didn't do it themselves.


Last edited by bower5932 on Tue Feb 22, 2005 8:48 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
jefflowrey
PostPosted: Tue Feb 22, 2005 8:13 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There are basically three places that topics "exist", as far as I know.

One is in the broker subscription tables.

Another is in the User Name Server, if WBIEB or WBIMB are used as the broker.

The third place is in JNDI repositories for JMS Topic Destinations, if JMS and JNDI are being used.

Otherwise, topics are logical things that only have representations in message headers.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Feb 22, 2005 8:52 am    Post subject: Reply with quote

Jedi Knight

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

One other thing about topics. If you want to secure your topics, you need to use WBIEB or WBIMB. The MA0C broker doesn't have topic based security.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
jefflowrey
PostPosted: Tue Feb 22, 2005 8:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Mind you, the User Name Server in WBEMB/WBIMB doesn't secure the messages, it controls who is allowed to publish to topics and who is allowed to subscribe to topics.

But the published messages are only as secure as they were when you wrote them to the publication queue.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vin
PostPosted: Tue Feb 22, 2005 9:57 am    Post subject: Reply with quote

Master

Joined: 25 Mar 2002
Posts: 212
Location: India

thanks for the answers, which queue is it that I check for to get the depth of messages on the topic? what will be the name of that subscribe queue?
Back to top
View user's profile Send private message
Vin
PostPosted: Tue Feb 22, 2005 10:05 am    Post subject: Reply with quote

Master

Joined: 25 Mar 2002
Posts: 212
Location: India

If you want to secure your topics, you need to use WBIEB or WBIMB

can you tell me what they mean ? sorry not aware of them
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 22, 2005 10:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Vin wrote:
thanks for the answers, which queue is it that I check for to get the depth of messages on the topic? what will be the name of that subscribe queue?


Unless you have registered a subscriber, there is no queue you can check. The topic doesn't exist, and the messages published to that topic go NOWHERE if there are no subscriptions.

Each subscriber can register whatever queue name it wants to use, and will receive messages on that queue. Each queue registered will be only as deep as the subscriber application allows it to be.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 22, 2005 10:21 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Vin wrote:
If you want to secure your topics, you need to use WBIEB or WBIMB

can you tell me what they mean ? sorry not aware of them

The products being referred to are WebSphere Business Integration Event Broker and WebSphere Business Integration Message Broker.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Feb 22, 2005 10:39 am    Post subject: Reply with quote

Jedi Knight

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

Vin wrote:
which queue is it that I check for to get the depth of messages on the topic? what will be the name of that subscribe queue?


It depends on what you register. If you look at the Using Java manual, there are default queue names (you can override) used for both durable and non-durable subscribers when using JMS. If you are writing your own programs to build the message headers that control publish/subscribe, then you'll specify the queue name to be used.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Vin
PostPosted: Tue Feb 22, 2005 10:42 am    Post subject: Reply with quote

Master

Joined: 25 Mar 2002
Posts: 212
Location: India

Each subscriber can register whatever queue name it wants to use, and will receive messages on that queue. Each queue registered will be only as deep as the subscriber application allows it to be.


the way I'm registering a subscribe is tsubscriber = tsession.createSubscriber(topic);

where topic name is something like topic://listentopic.

what is going to be the queue name in this case,

or should I register the subscriber like tsession.createSubscriber(topic, "MyQueue");
and in this case check the depth of the queue with the name MyQueue?

Please clarify
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 22, 2005 10:47 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

bower5932 wrote:
If you look at the Using Java manual, there are default queue names (you can override) used for both durable and non-durable subscribers when using JMS.

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vin
PostPosted: Tue Feb 22, 2005 10:51 am    Post subject: Reply with quote

Master

Joined: 25 Mar 2002
Posts: 212
Location: India

looked at this queue SYSTEM.JMS.D.SUBSCRIBER.QUEUE and it shows a depth. Now here is my question, do all durable subscribers use the same queue to get the messages from? how do I configure the queues from which the durable subscribers have to get their messages from?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 22, 2005 10:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

bower5932 wrote:
there are default queue names (you can override)
bower5932 wrote:
If you look at the Using Java manual

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vin
PostPosted: Tue Feb 22, 2005 11:55 am    Post subject: Reply with quote

Master

Joined: 25 Mar 2002
Posts: 212
Location: India

sure will read the java manual first before posting any more questions.
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 checking the depth of topics
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.