Author |
Message
|
techno |
Posted: Mon Nov 22, 2004 11:20 am Post subject: Publish/Subscribe |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
I know that this module comes as Support Pac. Does 5.3 has this included? Is this feature supported on Mainframe?
Thanks |
|
Back to top |
|
 |
EddieA |
Posted: Mon Nov 22, 2004 11:46 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
From the SupportPac page:
Quote: |
MQSeries Publish/Subscribe is available for Microsoft Windows NT, Windows 2000, AIX, HP-UX, Linux and Sun Solaris. |
From the CSD08 Readme:
Quote: |
From Fix Pack 8 (CSD08), SupportPac MA0C: WebSphere MQ - Publish/Subscribe, is now incorporated into WebSphere MQ. If this SupportPac is already installed it must be removed before installing this fix pack. |
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
techno |
Posted: Mon Nov 22, 2004 12:53 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
I am sorry. So, is CSD08 not available for Mainframe?
If Pub/Sub is not available on MF this way, what can I use to have cost-effective solution?(It does not cost any thing on othre platforms)
Can I have MQ installed on other Machine (I have this already) with CSD08 and messages published on this, from MF --- I guess this would be a client connection...
Thanks |
|
Back to top |
|
 |
EddieA |
Posted: Mon Nov 22, 2004 3:42 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
Can I have MQ installed on other Machine (I have this already) with CSD08 and messages published on this, from MF |
I don't see why not.
Quote: |
I guess this would be a client connection... |
No. There is no client available for z/OS. Just have a Remote Q on the MF pointing at the correct Publisher Q on the Pub/Sub Broker.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
techno |
Posted: Tue Nov 23, 2004 8:51 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Thank you.
Is it correct that Acknowledgement on receiving message is not possible in publish/subscribe?
Thanks |
|
Back to top |
|
 |
EddieA |
Posted: Tue Nov 23, 2004 9:24 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
What do you mean by Acknowledgement. Which "component" do you want to send and/or receive this.
But, also think about the Pub/Sub paradigm and how it's designed to de-couple Subscribers from Publishers.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
techno |
Posted: Tue Nov 23, 2004 1:43 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
It is to Publisher. I understand that acknowledgement makes the system coupled. --- So, there is nothing like acknowledging sender in pub/sub.
Thanks |
|
Back to top |
|
 |
jsware |
Posted: Tue Nov 23, 2004 1:57 pm Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
I found when playing around with JMS pubsub talking to a WBIMB broker, that JMS seems to want a reply back from the broker. I am unable to determine how to stop this from being requested. This kind-a goes against the decoupled nature of pub/sub (I do not want JMS publishers to fail if the pub/sub broker is not available).
On another note, if CSD08 includes pub/sub in base MQ, how does this affect installing CSD08 on a WMQI/WBIMB host? _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
EddieA |
Posted: Tue Nov 23, 2004 2:33 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
It is to Publisher |
You could always use the "normal" COA/COD options, so the Publisher will know when the Broker has consumed the message.
Quote: |
how does this affect installing CSD08 on a WMQI/WBIMB host? |
It doesn't. All this "feature" does, is to install the binaries, just like the installation of the SupportPac. It doesn't configure or start the Broker.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
techno |
Posted: Wed Nov 24, 2004 8:14 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Quote: |
No. There is no client available for z/OS. Just have a Remote Q on the MF pointing at the correct Publisher Q on the Pub/Sub Broker. |
Could you throw some light on this? I have a qmgr on MF; a qmgr and pub/sub broker (supportpac) on Unix. I have some topic at Unix end. I create a remote queue pointing to Unix. How do I publish to the topic from MF?
I have read http://www.mqseries.net/phpBB/viewtopic.php?t=3278
It is great. In code, where do you have queue-name. Connection is doneto to topic. It does not seem to be to queue. I am not clear here....
Sample code helps.
Thanks |
|
Back to top |
|
 |
techno |
Posted: Wed Nov 24, 2004 11:49 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Some improvement..
I have qmgr3 and qmgr4 on one machine and created mq objects as specified in above link. Running broker on qmgr3. My code is something like this.
TopicConnectionFactory topicConnectionFactory = null;
TopicSession topicSession = null;
Topic topic = null;
TopicConnection topicConnection = null;
TopicPublisher publisher =null;
TopicSubscriber subscriber = null;
TopicSession pubSession = null;
try{
topicConnectionFactory = new MQTopicConnectionFactory();
((MQTopicConnectionFactory) topicConnectionFactory).setQueueManager("qmgr4");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerQueueManager("qmgr3");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerCCSubQueue();
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerControlQueue("BROKER.CONTROL.QUEUE");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerPubQueue("BROKER.DEFAULT.STREAM");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerSubQueue();
topicConnection = topicConnectionFactory.createTopicConnection();
topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
topic = topicSession.createTopic("NEWSTOPIC");
pubSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
//TopicSession subSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
publisher = pubSession.createPublisher(topic);
//subscriber = subSession.createSubscriber(topic);
TextMessage message = pubSession.createTextMessage();
message.setText("This is message i");
publisher.publish(message);
I am getting error:
javax.jms.JMSException: MQJMS5087: Unexpected error 2085 accessing internal queu
e SYSTEM.JMS.REPORT.QUEUE
Anything wrong in code? Pls help. |
|
Back to top |
|
 |
EddieA |
Posted: Wed Nov 24, 2004 1:10 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
|
Back to top |
|
 |
techno |
Posted: Wed Nov 24, 2004 2:24 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Thank you. Defined that queue.
When I make broker qmgr and general qmgr in above code same as broker qmgr, it does not give any error? Where do I see published messages? If there is no subscriber, what happens to the published messages?
Code:
topicConnectionFactory = new MQTopicConnectionFactory();
((MQTopicConnectionFactory) topicConnectionFactory).setQueueManager("qmgr3");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerQueueManager("qmgr3");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerCCSubQueue();
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerControlQueue("BROKER.CONTROL.QUEUE");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerPubQueue("BROKER.DEFAULT.STREAM");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerSubQueue();
When I make them different, I am getting error:
com.ibm.mq.jms.NoBrokerResponseException: MQJMS5053: *** No broker response. Ple
ase ensure that the broker is running. If you are using the WebSphere MQ broker
check that your brokerVersion is set to V1 ***
Code:
topicConnectionFactory = new MQTopicConnectionFactory();
((MQTopicConnectionFactory) topicConnectionFactory).setQueueManager("qmgr4");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerQueueManager("qmgr3");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerCCSubQueue();
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerControlQueue("BROKER.CONTROL.QUEUE");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerPubQueue("BROKER.DEFAULT.STREAM");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerSubQueue();
I tried to change the topic name to : "topic://NEWSTOPIC1?brokerVersion=1"
I am still getting the error.
Any help?
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 24, 2004 2:27 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
techno wrote: |
If there is no subscriber, what happens to the published messages? |
They are discarded.
Possibly, if they are persistent, they go to DLQ. But I doubt that.
If I clap one hand in the middle of the forest, do the trees achieve satori? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 24, 2004 5:17 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If the broker is set up on a specific qmgr you need to define / redefine some queues in order to put the publish queue remote pointing to the qmgr with the broker and the queue for the subscriber remote on the broker and pointing to the queue where the subscriber will consume the messages.....
Enjoy  |
|
Back to top |
|
 |
|