|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Publish/Subscribe |
« View previous topic :: View next topic » |
Author |
Message
|
techno |
Posted: Thu Dec 02, 2004 1:37 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Dec 02, 2004 6:51 pm Post subject: |
|
|
 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 |
|
 |
techno |
Posted: Fri Dec 03, 2004 8:05 am Post subject: |
|
|
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 |
|
 |
techno |
Posted: Fri Dec 03, 2004 2:12 pm Post subject: |
|
|
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 |
|
 |
|
|
|
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
|
|
|
|