Author |
Message
|
Bernardo11 |
Posted: Mon Oct 16, 2017 5:18 am Post subject: Issues specifying "ReplytoQueue" and "Replyto |
|
|
Newbie
Joined: 16 Oct 2017 Posts: 7
|
Hello All,
I'm having the following issue while specifying the "ReplytoQueue" and "ReplytoQMgr" on "Q", i was able to specify the ApplIdentity but not the other 2, i'm using the following command, can you please give me some lights on what i'm doing wrong? According to the help command i'm using the right tags to do it i'm not understanding why it's not working.
Basicaly i want to send out a message from a file with "ReplytoQueue", "ApplIdentity" and "ReplytoQMgr" on "Q":
/apps/mqm/admin/current/outils/bin/q -m QUEUEMANAGER -o TARGETQUEUE -E REPLYTOQUEUE REPLYTOQMGR -AiAPPLIDENTITY -CI -F /PATH/TO/FILE
Regards
Bernardo |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
bruce2359 |
Posted: Mon Oct 16, 2017 5:57 am Post subject: |
|
|
![](images/avatars/58715422151eef88d5f6e3.jpg) Poobah
Joined: 05 Jan 2008 Posts: 9400 Location: US: west coast, almost. Otherwise, enroute.
|
What symptoms are you seeing? Is there an error of some kind?
"...it's not working..." is not sufficient information for us to help. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Bernardo11 |
Posted: Mon Oct 16, 2017 6:18 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2017 Posts: 7
|
Hello,
Yes sorry was a good point "not working" is in fact not valid.
"MQSeries Q Program by Paul Clarke [ V4.5 Build:Sep 25 2006 ]
(c) Copyright IBM Corp. 1995, 2006
Usage: Q <Optional flags as below>
[-a[dnpqRrst] Message attributes
p:Persistent,n:Non-Persisent,q:Persistence as Q,s:Allow Segmentation
d:Datagram,R:Request,r:Reply,t:Report
[-A[i|o]<value> Application Identity|Origin Data
(c) [-b Browse input Q (DEP:use i rather than I]"
Basicaly shows this, so one of the flags is not compliant.
Thank you in advance.
Regards
Bernardo |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
zpat |
Posted: Mon Oct 16, 2017 6:21 am Post subject: |
|
|
![](images/avatars/200698233754e3c3649f6d0.jpg) Jedi Council
Joined: 19 May 2001 Posts: 5849 Location: UK
|
I am sure Paul Clarke will appear once darkness falls and comment, but...
-E does not do what you think it does.
Try using -r REPLYQUEUENAME _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Bernardo11 |
Posted: Mon Oct 16, 2017 6:35 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2017 Posts: 7
|
Hello,
Thank you for the quick reply.
So using your tip i was now able to populate the field ReplytoQ:
/apps/mqm/admin/current/outils/bin/q -m QUEUEMANAGER -o TARGETQUEUE -r REPLYTOQ -AiAPPLIDENTITY -CI -F /PATH/TO/FILE
The only thing missing now is... "ReplyToQMgr", according to the tags:
" [-e Echo to Reply Queue]
[-E Echo to Reply Queue and set Reply QMgr]
"
The -E does not seem to work at least the way i'm using it:
/apps/mqm/admin/current/outils/bin/q -m QUEUEMANAGER -o TARGETQUEUE -r REPLYTOQ -EREPLYOQMGR -AiAPPLIDENTITY -CI -F /PATH/TO/FILE
Regards
Bernardo |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
zpat |
Posted: Mon Oct 16, 2017 7:08 am Post subject: |
|
|
![](images/avatars/200698233754e3c3649f6d0.jpg) Jedi Council
Joined: 19 May 2001 Posts: 5849 Location: UK
|
Like I said, you have misinterpreted what -E does. Remove that option
MQMD.ReplytoQMGR is generally populated automatically as the QM putting the message - have you looked at the generated message's MQMD on the queue?
What matters is that the message on the queue is correct. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Bernardo11 |
Posted: Mon Oct 16, 2017 7:49 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2017 Posts: 7
|
Hello,
So to explain this more deeply, i have removed the -E option and it populates with the origin queue manager name, the problem is, this message passes throught some HUB's, so the replytoQMgr is not the same (in terms of name) as the server that sent the mesage originaly, thats why it cannot remain the same name.
Thats why i wanted to specify the reply to QMgr.
Regards
Bernardo |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Vitor |
Posted: Mon Oct 16, 2017 7:54 am Post subject: |
|
|
![](images/avatars/905340816499abc1cdfb07.jpg) Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Bernardo11 wrote: |
the problem is, this message passes throught some HUB's, so the replytoQMgr is not the same (in terms of name) as the server that sent the mesage originaly |
No, the problem is you don't have enough queue manager aliases in your topology. The reason the field defaults to the originating queue manager is that in 99.9% of all cases that's where you want the reply to go to.
It seems that's true for you, you just don't have enough plumbing for the message to find it's own way. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
fjb_saper |
Posted: Mon Oct 16, 2017 8:34 am Post subject: |
|
|
![](images/avatars/gallery/misc/2.gif) Grand High Poobah
Joined: 18 Nov 2003 Posts: 20696 Location: LI,NY
|
And if you're sending the request and not the reply use -R instead of -r ... ![](images/smiles/innocent.gif) _________________ MQ & Broker admin |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Bernardo11 |
Posted: Mon Oct 16, 2017 9:44 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2017 Posts: 7
|
fjb_saper wrote: |
And if you're sending the request and not the reply use -R instead of -r ... :innocent: |
Hello,
The option -r is the correct, i have validate and it populates correcly the field "ReplyToQueue".
I went further on my research and found out something interesting, the issue right now is with the ApplIdentity, the destination is waiting for a string and a extra space on the final, how can i send 'THISSTRING ' instead of 'THISSTRING' using this command? Anyone have an idea on how to do it?
/apps/mqm/admin/current/outils/bin/q -m QUEUEMANAGER -o TARGETQUEUE -r REPLYTOQ -AiAPPLIDENTITY -CI -F /PATH/TO/FILE
I tested with "'-AiAPPLIDENTITY '" but still not working, the extra space is not added.
Regards
Bernardo |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
PaulClarke |
Posted: Mon Oct 16, 2017 12:28 pm Post subject: |
|
|
![](images/avatars/46729506851b1e76395b14.jpg) Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Q allows queue names to be specify in two parts in a single parameter.....for example
Code: |
q -o TARGETQM/TARGETQ |
This tells queue to put to queue TARGETQ on Queue Manager TARGETQM. The Queue Manager piece is, of course, optional.
You can do the same thing with the reply queue so
Code: |
q -oMYTARGET -rREPLYQM/REPLYQ |
Will allow you to fill both the reply queue and reply queue manager accordingly.
Hope this helps,
Cheers,
Paul _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Bernardo11 |
Posted: Tue Oct 17, 2017 1:29 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2017 Posts: 7
|
Hello Paul,
Thank you for your quick reply.
It solved my issue placing the "ReplytoQMGR" and "ReplytoQ".
I have now another uncommon, the destination to where i'm trying to send the message created for some unknown reason the ApplIdentity to indentify us with a space after, so instead of beign 'STRING' is 'STRING ' (with the extra space added on the final), do i have any way to add that space using Q?
Thank you Paul!
Regards
Bernardo |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
PaulClarke |
Posted: Tue Oct 17, 2017 6:36 am Post subject: |
|
|
![](images/avatars/46729506851b1e76395b14.jpg) Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
I am surprised you have managed to set the field to 'STRING'. My understanding was that the Identity fields were blank padded to the length of the field anyway. All the MQMD fields are of fixed length. The ApplIdentityData field is 32 characters. I would have expected whatever value you specify using -Ai to be padded with enough blanks to make it up to 32 characters.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Bernardo11 |
Posted: Tue Oct 17, 2017 10:03 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2017 Posts: 7
|
Hello Paul,
Thank you for your help.
On my side the situation was solved, the destination was identifying my messages using the content of the header, and only accepted if a valid header was there. If this helps someone this is the way you can send a file message to a queue using "Q" to add to the header the following information:
- Reply to QMGR / Queue
- AppIdentity
- User Identifier
/apps/mqm/admin/current/outils/bin/q -m SOURCEMQGR -o SOURCEQUEUE -rREPLYTOQMGR/REPLYTOQUEUE -AiAPPIDENTITY -U USERID -CI -F /PATH/TO/FILE
Thank you again Paul, zpat and Vitor.
Regards
Bernardo |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
|