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 » General Discussion » Publish/Subscribe

Post new topic  Reply to topic Goto page Previous  1, 2, 3
 Publish/Subscribe « View previous topic :: View next topic » 
Author Message
techno
PostPosted: Thu Dec 02, 2004 1:37 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Finally this code seems to be working:

topicConnectionFactory = new MQTopicConnectionFactory();
((MQTopicConnectionFactory) topicConnectionFactory).setQueueManager("QMGR4");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerQueueManager("QMGR3");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerPubQueue("BROKER.DEFAULT.STREAM");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerControlQueue("BROKER.CONTROL.QUEUE")

Observe the commented line( commented setBrokerQueueManager() line.)
Above broker.* queues are remote queues defined on QMGR4

Above worked fine when QMGR3 and QMGR4 are on same box (Unix).

When I tried to have QMGR4 on Mainframe and QMGR3 on Unix box(Broker is with QMGR3),

I am getting this error:

MQPSCompCode 2 MQPSReason 3075 MQPSReasonText MQRCCF_INCORRECT_STREAM MQPSStreamName BROKER.DEFAULT.STREAM


I have seen explanation in amqnar09.pdf doc.

What is MQPS_STREAM_NAME or MQPSStreamName ? Where this needs to be defined.

I guess this is a different error. Can I get some help ?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 02, 2004 6:51 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20766
Location: LI,NY

Quote:
QueueConnectionFactory qConnectionFactory = new MQQueueConnectionFactory();
((MQQueueConnectionFactory) qConnectionFactory).setQueueManager("QMGR4");
QueueConnection qConnection = qConnectionFactory.createQueueConnection();
QueueSession qSession = qConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue qBrokerPubQueue = qSession.createQueue("BROKER.DEFAULT.STREAM");
Queue qBrokerControlQueue = qSession.createQueue("BROKER.CONTROL.QUEUE");


topicConnectionFactory = new MQTopicConnectionFactory();
((MQTopicConnectionFactory) topicConnectionFactory).setQueueManager("QMGR4");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerQueueManager("QMGR3");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerPubQueue("BROKER.DEFAULT.STREAM");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerControlQueue("BROKER.CONTROL.QUEUE");

topicConnection = topicConnectionFactory.createTopicConnection();
topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

change the red lines for (you might have to cast to MQQueue)
Code:
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerPubQueue(qBrokerPubQueue.getname());
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerControlQueue(qBrokerControlQueue.getname());
Back to top
View user's profile Send private message Send e-mail
techno
PostPosted: Fri Dec 03, 2004 8:05 am    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Thank you fjb_saper.

You seem to have missed another post made after that. Code started working..

Code:
topicConnectionFactory = new MQTopicConnectionFactory();
((MQTopicConnectionFactory) topicConnectionFactory).setQueueManager("QMGR4");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerQueueManager("QMGR3");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerPubQueue("BROKER.DEFAULT.STREAM");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerControlQueue("BROKER.CONTROL.QUEUE")





Quote:
Observe the commented line( commented setBrokerQueueManager() line.)
Above broker.* queues are remote queues defined on QMGR4

Above worked fine when QMGR3 and QMGR4 are on same box (Unix).

When I tried to have QMGR4 on Mainframe and QMGR3 on Unix box(Broker is with QMGR3),

I am getting this error:

MQPSCompCode 2 MQPSReason 3075 MQPSReasonText MQRCCF_INCORRECT_STREAM MQPSStreamName BROKER.DEFAULT.STREAM


I have seen explanation in amqnar09.pdf doc.

What is MQPS_STREAM_NAME or MQPSStreamName ? Where this needs to be defined.

I guess this is a different error. Can I get some help ?




Any help? Does it happen because of authority issue?
Back to top
View user's profile Send private message
techno
PostPosted: Fri Dec 03, 2004 2:12 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

This is what I found finally,

I have defined qremote defs:
BROKER.ADMIN.STREAM
BROKER.CONTROL.QUEUE
BROKER.DEFAULT.STREAM
and
SYSTEM.BROKER.ADMIN.STREAM
SYSTEM.BROKER.CONTROL.QUEUE
SYSTEM.BROKER.DEFAULT.STREAM

on non-brkr-qmgr on MF pointing to qlocals

SYSTEM.BROKER.ADMIN.STREAM
SYSTEM.BROKER.CONTROL.QUEUE
SYSTEM.BROKER.DEFAULT.STREAM

on brkr-qmgr on Unix.

On MF:


Below code throws error
Code:
topicConnectionFactory = new MQTopicConnectionFactory();
((MQTopicConnectionFactory) topicConnectionFactory).setQueueManager("QMGR4");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerQueueManager("QMGR3");         
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerPubQueue("BROKER.DEFAULT.STREAM");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerControlQueue("BROKER.CONTROL.QUEUE");


com.ibm.mq.jms.BrokerCommandFailedException: Broker command failed: MQRCCF_INCORRECT_STREAM

com.ibm.mq.jms.BrokerCommandFailedException: Broker command failed: MQRCCF_INCOR
RECT_STREAM
at com.ibm.mq.jms.SubscriptionHelper.checkResponse(SubscriptionHelper.ja
va:1100)
at com.ibm.mq.jms.MQTopicPublisher.publish(MQTopicPublisher.java:356)
at com.ibm.mq.jms.MQTopicPublisher.publish(MQTopicPublisher.java:395)
at com.scif.base.mqtransport.SamplePublisher.main(SamplePublisher.java:5
9)
ReasonCode:-1



Below code works fine.

Code:
topicConnectionFactory = new MQTopicConnectionFactory();
((MQTopicConnectionFactory) topicConnectionFactory).setQueueManager("QMGR4");
//((MQTopicConnectionFactory) topicConnectionFactory).setBrokerQueueManager("QMGR3");         
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerPubQueue("SYSTEM.BROKER.DEFAULT.STREAM");
((MQTopicConnectionFactory) topicConnectionFactory).setBrokerControlQueue("SYSTEM.BROKER.CONTROL.QUEUE");


For above to work, I added MF userid to mqm group on Unix side.

Could someone point anything why is happening?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3 Page 3 of 3

MQSeries.net Forum Index » General Discussion » Publish/Subscribe
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.