Author |
Message
|
kayoumt |
Posted: Fri Jun 05, 2009 1:53 pm Post subject: |
|
|
Voyager
Joined: 18 Sep 2007 Posts: 81
|
mqjeff,
I will definitely ask you your secret for finding quickly information. Your last answer will probably help me on the post below :
http://www.mqseries.net/phpBB2/viewtopic.php?t=49328
I saw in the same section you went on (XMS Client Manual, chapter 5) something that could be the solution also of that post. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jun 05, 2009 2:21 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20757 Location: LI,NY
|
Talking about pollution, I am going to candidly ask how the information you could have found reading up on QModel and JMSConnection Factory / MQConnection factory was irrelevant to the question you asked? (Apart from the fact that it was making you do the work)?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kayoumt |
Posted: Sat Jun 06, 2009 11:28 am Post subject: |
|
|
Voyager
Joined: 18 Sep 2007 Posts: 81
|
After some MQ coding in C++ :
1) Dynamic Temporary Queues
Thanks mqjeff ; XMSC_WPM_TEMP_Q_PREFIX has been a great part of my solution. My code did compile with that property ; but, did not run. I tried the same kind of property, with WMQ at the place of WPM (XMSC_WMQ_TEMP_Q_PREFIX) ; it worked Number 1. I had been able to generated queues with 32 characters long prexfix, the other 16 was generated by MQ (Total is 48 maximum, like MQ common convention).
2) Dynamic Temporary Topics
I tried the same approach for temporary topics with XMSC_WPM_TEMP_TOPIC_PREFIX (or XMSC_WMQ_TEMP_TOPIC_PREFIX) and session.createTemporaryTopic(). My code compiles but did not run. It seems that functionality is not implemented.
For topics ; all I need for topics is to see them removed from MQ after there no longer is applications subscribed to them. Even if it is possible to create dynamic topics, a system generated topic will not work for me. I need my Publisher and Subscriber communicate without sharing topics. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jun 06, 2009 12:53 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20757 Location: LI,NY
|
kayoumt wrote: |
2) Dynamic Temporary Topics
I tried the same approach for temporary topics with XMSC_WPM_TEMP_TOPIC_PREFIX (or XMSC_WMQ_TEMP_TOPIC_PREFIX) and session.createTemporaryTopic(). My code compiles but did not run. It seems that functionality is not implemented.
For topics ; all I need for topics is to see them removed from MQ after there no longer is applications subscribed to them. Even if it is possible to create dynamic topics, a system generated topic will not work for me. I need my Publisher and Subscriber communicate without sharing topics. |
I believe that for Temporary Topics, you may be barking up the wrong tree.
A topic lives independently of the subscribers/consumers and publishers/producers.
A topic exists as soon as you have at least one producer or one consumer for it. This goes for dynamic topics. You may also have topics that have been registered with the broker (permissions or durable subscriptions, retained publications, etc...)
Now looking at features in V7, I would understand your temporary topic to be a temporary topic alias queue. From the API:
Quote: |
An MQTemporaryTopic object is a unique Topic object created for the duration of a connection. |
Due to the JMS nature of the object I would have expected this to be the case for the duration of the session. However in a non JMS (java base) environment the scope of the object could be the scope of the connection (queue connection / topic connection).
You may also wish to review this part of the manual for more clarification... on MDURMDL and MNDURMDL parameters.
kayoumt wrote: |
I need my Publisher and Subscriber communicate without sharing topics. |
That's just not going to happen. Remember in a pub/sub world the ONLY thing that links producer and consumer is the topic.
Now if you meant without sharing the topic destination may I suggest you reread the link for topic definition and it's parameters just mentioned above...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jun 06, 2009 1:28 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20757 Location: LI,NY
|
Reading up further on http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Session.html you have to realize that the JMS temporary topic is the answer to request / reply in a pub/sub domain. The temporary topic gets created by the session and you have no say as to the topic string. However it can be retrieved for information and logging. The Temporary Topic Destination can be sent to the the service to request publication of the answer via a MessageProducer
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kayoumt |
Posted: Sat Jun 06, 2009 4:43 pm Post subject: |
|
|
Voyager
Joined: 18 Sep 2007 Posts: 81
|
Quote: |
A topic exists as soon as you have at least one producer or one consumer for it. |
It is what I believed. But, it seems not that it is what is happening. After stopping all applications, I see (with MQ Explorer) that all topics applications were using are not removed.
Quote: |
I need my Publisher and Subscriber communicate without sharing topics.
|
I did a wrong explanation. What I wanted to say is ; My Publisher and Subscriber are two independent applications. They have to have some common topics for sharing information but have not to decide on runtime what (dynamically generated) topics they will talk on.
In other terms, my Subscriber has not to verify if the topic it subscribes on exists on Publisher side or not. Once again, if applications stop, I want to see all topics removed from MQ. |
|
Back to top |
|
 |
mqjeff |
Posted: Sat Jun 06, 2009 5:00 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
To be clear, I never went to Google at all.
I said, to myself, "How does XMS handle Dynamic queue names?" - since that was the question you asked. Then I asked myself "Where would that information be *most likely* to be found?".
The answer to that question was "In the XMS Documentation". |
|
Back to top |
|
 |
kayoumt |
Posted: Sat Jun 06, 2009 5:22 pm Post subject: |
|
|
Voyager
Joined: 18 Sep 2007 Posts: 81
|
FYI mqjeff.
Quote: |
1) Dynamic Temporary Queues
Thanks mqjeff ; XMSC_WPM_TEMP_Q_PREFIX has been a great part of my solution. My code did compile with that property ; but, did not run. I tried the same kind of property, with WMQ at the place of WPM (XMSC_WMQ_TEMP_Q_PREFIX) ; it worked Number 1. I had been able to generated queues with 32 characters long prexfix, the other 16 was generated by MQ (Total is 48 maximum, like MQ common convention).
|
Solved.
Quote: |
2) Dynamic Temporary Topics
I tried the same approach for temporary topics with XMSC_WPM_TEMP_TOPIC_PREFIX (or XMSC_WMQ_TEMP_TOPIC_PREFIX) and session.createTemporaryTopic(). My code compiles but did not run. It seems that functionality is not implemented.
For topics ; all I need for topics is to see them removed from MQ after there no longer is applications subscribed to them. Even if it is possible to create dynamic topics, a system generated topic will not work for me. I need my Publisher and Subscriber communicate without sharing topics. |
Looking for solution.
From also old post : http://www.mqseries.net/phpBB2/viewtopic.php?t=49328 |
|
Back to top |
|
 |
shashikanth_in |
Posted: Sat Jun 06, 2009 9:41 pm Post subject: |
|
|
Centurion
Joined: 26 Feb 2009 Posts: 123
|
Apologies, I meant Session.createTemporaryQueue, (not Session.createQueue). Session.createTemporary queue returns a destination object. |
|
Back to top |
|
 |
kayoumt |
Posted: Sun Jun 07, 2009 7:02 am Post subject: |
|
|
Voyager
Joined: 18 Sep 2007 Posts: 81
|
Hi All,
Just to let you know :
The issue that thread was originally about (dynamic temporary queues) is solved.
For more efficiency and for avoiding to confuse people, it will be a good thing to temporarily close that thread. Because, the second issue (Temporary Topic) is already submitted in the post below :
http://www.mqseries.net/phpBB2/viewtopic.php?t=49328
By the way ; it will be a good thing to move that (49328) thread to the "Websphere MQ API Support" sub-forum. |
|
Back to top |
|
 |
|