Author |
Message
|
sanjoo |
Posted: Thu Feb 28, 2008 5:09 am Post subject: |
|
|
 Acolyte
Joined: 26 Oct 2005 Posts: 65
|
I am writting subscription message flow. Here is how code looks like but I am not seeing subscriber registered. Am I missing anyting?
CALL CopyEntireMessage();
-- If there is no RFH2 header, add one
IF CARDINALITY(OutputRoot.MQRFH2.*[]) = 0 THEN
CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN 'MQRFH2';
END IF;
-- Set MQRFH2 struct fields
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format= 'MQSTR';
SET OutputRoot.MQRFH2.psc.command='RegSub';
SET OutputRoot.MQRFH2.psc.Topic='Sport/Soccer/State/LatestScore/#';
SET OutputRoot.MQRFH2.psc.QmgrName='WBRK6_DEFAULT_QUEUE_MANAGER';
SET OutputRoot.MQRFH2.psc.QName='SUB_QUEUE';
Here is what I get in trace. Message is successfully put to control Q but I don't see any registrations.
Root:
(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2008-02-28 11:11:29.460'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = 'Sport/Soccer/State/LatestScore/#'
(0x03000000):ContentType = ''
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'SUBSCRIPTION_QUEUE'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = 'MQHRF2 '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d51205742524b365f44454641554c523ec64720007222'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'WBRK6_DEFAULT_QUEUE_MANAGER '
(0x03000000):UserIdentifier = 't9154r0 '
(0x03000000):AccountingToken = X'160105150000007ce31f2ea5e11002befe1fb1fc03000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = '4r0\Desktop\ih03\rfhutil.exe'
(0x03000000):PutDate = DATE '2008-02-28'
(0x03000000):PutTime = GMTTIME '11:11:29.460'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):MQRFH2 = (
(0x03000000):Version = 2
(0x03000000):Format = ''
(0x01000000):psc = (
(0x01000000):command = (
(0x02000000): = 'RegSub'
)
(0x01000000):Topic = (
(0x02000000): = 'Sport/Soccer/State/LatestScore/#'
)
(0x01000000):QmgrName = (
(0x02000000): = 'WBRK6_DEFAULT_QUEUE_MANAGER'
)
(0x01000000):QName = (
(0x02000000): = 'SATARA_SHAHUNAGAR_QUEUE'
)
)
) _________________ Sanjoo
Keep smiling
 |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 28, 2008 5:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sanjoo wrote: |
I am writting subscription message flow. Here is how code looks like but I am not seeing subscriber registered. Am I missing anyting? |
You missed that the thread you posted on was 4 years old and not relevant to your problem!
You are not seeing the subscription registered where? How? What errors does the subscriber throw? What errors (if any) does the publisher throw? How did you decide on subscribing directly with a flow?
Basically, what happens when you try it & what have you done already to identify & resolve the problem? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AkankshA |
Posted: Fri Feb 29, 2008 4:02 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
How about populating the ReplyToQ field of MQRFH2 header and seeing the response in pscr folder... you ll get the confirmation if subscription is registered or not and in later case the error code shall help u in diagnosing the real cause of the problem ... _________________ Cheers |
|
Back to top |
|
 |
sanjoo |
Posted: Sun Mar 02, 2008 10:34 pm Post subject: |
|
|
 Acolyte
Joined: 26 Oct 2005 Posts: 65
|
Akanksha,
I tried with SET OutputRoot.MQRFH2.psc.ReplyQ='xy'';
Nothing is comming back on ReplyToQ. No messages on DLQ either.
RegSub message is being processed from control queue but with no effect.
Vitor,
You can see list of subscribers from broker admin console or by following command -
mqsibrowse WBRK6_DEFAULT_BROKER -t bsubscriptions
When I run my dummy java subscriber application, I can see that subscriber added in the list but not thru when I try to do the same from my message flow. Only intention to go for this approach is to lessen the burden of constructing RFH2 header and sending to broker. Instead app can just cinstruct a simple XML with all concerned parameters and from there my flow will take further.
Thanks. _________________ Sanjoo
Keep smiling
 |
|
Back to top |
|
 |
AkankshA |
Posted: Sun Mar 02, 2008 10:39 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
sanjoo wrote: |
Akanksha,
I tried with SET OutputRoot.MQRFH2.psc.ReplyQ='xy'';
. |
No no .. not inside psc folder.
It shall be of MQRFH2 header
SET OutputRoot.MQRFH2.ReplyToQ='xy''; _________________ Cheers |
|
Back to top |
|
 |
Vitor |
Posted: Mon Mar 03, 2008 1:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AkankshA wrote: |
It shall be of MQRFH2 header
SET OutputRoot.MQRFH2.ReplyToQ='xy''; |
Gosh - all these years I've been wasting setting it on the MQMD!
No wonder I've never had much luck with pub/sub. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Mar 03, 2008 1:39 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
Aaahh... It is MQMD
SET OutputRoot.MQMD.ReplyToQ='xy';
Copy paste does not always help..  _________________ Cheers |
|
Back to top |
|
 |
sanjoo |
Posted: Mon Mar 03, 2008 1:51 am Post subject: |
|
|
 Acolyte
Joined: 26 Oct 2005 Posts: 65
|
No luck even with SET OutputRoot.MQRFH2.ReplyToQ='xy'';
messages are getting lost in black hole. _________________ Sanjoo
Keep smiling
 |
|
Back to top |
|
 |
Vitor |
Posted: Mon Mar 03, 2008 2:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sanjoo wrote: |
No luck even with SET OutputRoot.MQRFH2.ReplyToQ='xy'';
|
I'm a) surprised that was allowed in ESQL b) you actually tried it.
See the conversation above. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sanjoo |
Posted: Mon Mar 03, 2008 10:32 pm Post subject: |
|
|
 Acolyte
Joined: 26 Oct 2005 Posts: 65
|
My mistake..
but I had already tried with SET OutputRoot.MQMD.ReplyToQ='xy';
call me dumb but I thought there might be some ReplyToQ field unknown to me in MQRFH2.
MQ 6.0
Broker 6.0.0
need to upgrade?
Thanks _________________ Sanjoo
Keep smiling
 |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Mar 03, 2008 10:40 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
sanjoo wrote: |
SET OutputRoot.MQMD.ReplyToQ='xy';
|
Do you not get any message in this queue ???
sanjoo wrote: |
need to upgrade?
|
Its good if u do ... _________________ Cheers |
|
Back to top |
|
 |
sanjoo |
Posted: Tue Mar 04, 2008 12:44 am Post subject: |
|
|
 Acolyte
Joined: 26 Oct 2005 Posts: 65
|
SET OutputRoot.MQMD.ReplyToQ='xy';
Do you not get any message in this queue ???
nope... nothing there...nothing on DLQ.
Just a guess but I was reading about durable subscriptions. Do I need durable subscription in order to actually see it listed? Not sure.
Thanks again. _________________ Sanjoo
Keep smiling
 |
|
Back to top |
|
 |
EddieA |
Posted: Tue Mar 04, 2008 9:42 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
As well as the ReplyToQueue, try setting the NAN and PAN Report options. That's what's used by a Publish to get a reply back.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
sanjoo |
Posted: Thu Mar 06, 2008 2:13 am Post subject: |
|
|
 Acolyte
Joined: 26 Oct 2005 Posts: 65
|
Thanks Eddie. Finally I am getting some response on ReplyToQ. I am getting mqrc 3079 : MQRCCF_INCORRECT_Q. It doesn't make any sense coz I am using SYSTEM.BROKER.CONTROL.QUEUE`and I can see message hitting control queue and being processed by broker.
If I do subscribe using rfhutil, that works fine. I have compared messages from rfhutil and from my flow and tried to make them look same but with no success. Am I overlooking something obvious?
Root:
(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2008-03-06 09:49:55.930'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = 'SPORTS/ZZZ'
(0x03000000):ContentType = ''
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'SUBSCRIPTION_QUEUE'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = 'MQHRF2 '
(0x03000000):Version = 2
(0x03000000):Report = 3
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d5120524146412020202020202020b747ce4720005c39'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = 'XXX'
(0x03000000):ReplyToQMgr = 'RAFA '
(0x03000000):UserIdentifier = 'z2345a '
(0x03000000):AccountingToken = X'160105150000007ce31f2ea5e11002befe1fb1fc03000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = '4r0\Desktop\ih03\rfhutil.exe'
(0x03000000):PutDate = DATE '2008-03-06'
(0x03000000):PutTime = GMTTIME '09:49:55.930'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):MQRFH2 = (
(0x03000000):Version = 2
(0x03000000):Format = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Flags = 0
(0x01000000):psc = (
(0x01000000):command = (
(0x02000000): = 'RegSub'
)
(0x01000000):Topic = (
(0x02000000): = 'SPORTS/ZZZ'
)
(0x01000000):QmgrName = (
(0x02000000): = 'RAFA'
)
(0x01000000):QName = (
(0x02000000): = SUB_QUEUE'
)
)
) _________________ Sanjoo
Keep smiling
 |
|
Back to top |
|
 |
sanjoo |
Posted: Thu Mar 06, 2008 5:05 am Post subject: |
|
|
 Acolyte
Joined: 26 Oct 2005 Posts: 65
|
and this is my esql -
--CALL CopyMessageHeaders();
CALL CopyEntireMessage();
-- If there is no RFH2 header, add one
IF CARDINALITY(OutputRoot.MQRFH2.*[]) = 0 THEN
CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN 'MQRFH2';
END IF;
-- Set MQRFH2 struct fields
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;
SET OutputRoot.MQMD.Encoding = 437;
SET OutputRoot.MQMD.MsgType = MQMT_DATAGRAM;
SET OutputRoot.MQMD.Report = MQRO_PAN + MQRO_NAN;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
-- SET OutputRoot.MQRFH2.(MQRFH2.Field)Format= MQFMT_STRING;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Encoding = 546;
-- SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId= 437;
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID =1208;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Flags = 0;
SET OutputRoot.MQRFH2.psc.command='RegSub';
SET OutputRoot.MQRFH2.psc.Topic='SPORTS/ZZZ';
SET OutputRoot.MQRFH2.psc.QmgrName='RAFA';
SET OutputRoot.MQRFH2.psc.QName=SUB_QUEUE';
SET OutputRoot.MQRFH2.mcd = NULL;
SET OutputRoot.MQMD.ReplyToQ='XXX';
RETURN TRUE; _________________ Sanjoo
Keep smiling
 |
|
Back to top |
|
 |
|