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 » setup amqsech to test triggering

Post new topic  Reply to topic Goto page 1, 2  Next
 setup amqsech to test triggering « View previous topic :: View next topic » 
Author Message
lozaza
PostPosted: Mon Jun 10, 2013 2:32 am    Post subject: setup amqsech to test triggering Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 27

hi all, I am setting up a triggering process with two queue managers QM1 and QM5 as below.

I want to put a message on QR1 on QM1 and get a response on QL2 on QM1.

QM1:
DEFINE QLOCAL(TO.QM5) USAGE(XMITQ)
DEFINE QREMOTE (QR1) RNAME(QL1) RQMNAME(QM5) XMITQ(TO.QM5)
DEFINE QREMOTE(QM5) RQMNAME(QM5) XMITQ(TO.QM5)
DEFINE QLOCAL(QL2)

QM5:

DEFINE QLOCAL(QM5.INITQ)
DEFINE PROCESS(ECHO) APPLICID('amqsech')
DEFINE QLOCAL(QL1) TRIGGER TRIGTYPE(FIRST) PROCESS(ECHO) INITQ(QM5.INITQ)
DEFINE QMODEL(QM5.MODEL.REPLY)
DEFINE QLOCAL(TO.QM1) USAGE(XMITQ)
DEFINE QREMOTE (QR2) RNAME(QL2) RQMNAME(QM1) XMITQ(TO.QM1)
DEFINE QREMOTE(QM1) RQMNAME(QM1) XMITQ(TO.QM1)

the connections are all good, messages can be delivered to QL1 on QM5 from QR1 on QM1.

I tried amqsreq QL1 QM5 QM5.MODEL.REPLY and the trigger monitor works just fine.

but how do I go to put a message on QR1 on QM1 and get a response on QL2 on QM1 by amqsreq.
tried amqsreq QR1 QM1 but doesn't work. Thanks in advance.

JS
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Jun 10, 2013 4:40 am    Post subject: Re: setup amqsech to test triggering Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

lozaza wrote:
...but doesn't work. Thanks in advance.

JS

What doesn't work? What exactly and precisely are the results of your testing? Is there any ReasonCode?

Have you defined dead-letter queues on both QM1 and QM5? Are there any messages in your QM1 or QM5 dead-letter queues?

I'm afraid that "...doesn't work." is insufficient information to be of much 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
View user's profile Send private message
lozaza
PostPosted: Mon Jun 10, 2013 5:19 am    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 27

C:\>amqsreq QR1 QM1
Sample AMQSREQ0 start
server queue is QR1
MQOPEN ended with reason code 2085
unable to open reply queue
Sample AMQSREQ0 end

says unable to open reply queue 2085, I dont have a reply queue on qm1 but should i have one in order to get a response on ql2?
i have dead letter queue defined on both qm but nothing in it.

if my logic is wrong, how can i get a response on ql2 after use amqsreq to put a message on qr1 on qm1
Back to top
View user's profile Send private message
exerk
PostPosted: Mon Jun 10, 2013 5:42 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

lozaza wrote:
...I dont have a reply queue on qm1 but should i have one in order to get a response on ql2?...

If you want to receive the reply message on QL2 of QM1 then you must define QL2 on QM1 (which it appears you have done from your first post) and you must have a route back to it.

From your first post:

Quote:
DEFINE QREMOTE (QR2) RNAME(QL2)


So, do you think you have a route back? And do you think that specifying the Reply-to-Queue is better than specifying the Reply-to-Queue-Manager?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
lozaza
PostPosted: Mon Jun 10, 2013 6:20 am    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 27

hmm, thats the problem cuz it doesn't really route back as the reply-to-queue is a model queue on QM5.

I have a queue manager alias on qm5 which goes to qm1, thinking maybe i should use that as the reply to queue then route back to qm1?(maybe cant be done in correct syntax) time to ready the manual.
Back to top
View user's profile Send private message
exerk
PostPosted: Mon Jun 10, 2013 6:22 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Why do you need QM1 -> QM5 -> QM1 routing? Why are you not routing the reply message back directly?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
lozaza
PostPosted: Mon Jun 10, 2013 6:39 am    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 27

tried
C:\>amqsreq QR1 QM1 QL2
Sample AMQSREQ0 start
server queue is QR1
replies to QL2

changed the reply-to-queue on QM5 from QM5.MODEL.REPLY to QL2 but didn't work it doesn't know QL2 on QM1. getting a bit confused now.
Back to top
View user's profile Send private message
exerk
PostPosted: Mon Jun 10, 2013 6:51 am    Post subject: Re: setup amqsech to test triggering Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

The following should help - note that I've not 'supplied' every attribute:

lozaza wrote:
QM1:
DEFINE QREMOTE(QR1) RNAME(QL1) RQMNAME(QM5) XMITQ(QM5)
DEFINE QLOCAL(QM5) USAGE(XMITQ)
DEFINE CHANNEL(QM1.QM5) CHLTYPE(SDR)
DEFINE CHANNEL(QM5.QM1) CHLTYPE(RCVR)
DEFINE QLOCAL(QL2)
DEFINE LISTENER

QM5:
DEFINE QLOCAL(QL1) TRIGGER TRIGTYPE(FIRST) PROCESS(ECHO) INITQ(QM5.INITQ)
DEFINE QLOCAL(QL1.INITQ)
DEFINE PROCESS(ECHO) APPLICID('amqsech')
DEFINE QLOCAL(QM1) USAGE(XMITQ)
OPTIONAL: DEFINE QREMOTE(QL2) RNAME(QL2) RQMNAME(QM1) XMITQ(QM1)
DEFINE CHANNEL(QM5.QM1) CHLTYPE(SDR)
DEFINE CHANNEL(QM1.QM5) CHLTYPE(RCVR)
DEFINE LISTENER

C:\>amqsreq QR1 QM1 QL2

_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jun 10, 2013 7:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Why are you testing triggering using this method?

If you just want to test that triggering works, you only need one queue manager.

Once you've shown that you can put a message on a given queue, and have the trigger monitor start the defined process, then it doesn't matter where the message comes from.

So, again, what are you really trying to test?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 10, 2013 8:50 pm    Post subject: Reply with quote

Grand High Poobah

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

@exerk
Not supplied every object either. So you defined an INITQ, just not the one being used by the triggered Q... Also a trigger monitor needs to be started against the right INITQ. As you said all attributes are not shown, specifically the XMITQ attribute of the sdr channel...

Hope this gave enough additional hints to the OP.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
exerk
PostPosted: Mon Jun 10, 2013 11:43 pm    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

fjb_saper wrote:
@exerk
Not supplied every object either. So you defined an INITQ, just not the one being used by the triggered Q... Also a trigger monitor needs to be started against the right INITQ. As you said all attributes are not shown, specifically the XMITQ attribute of the sdr channel...

Hope this gave enough additional hints to the OP.

I didn't want to give the OP the whole

And as the OP stated "...and the trigger monitor works just fine..."
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
lozaza
PostPosted: Tue Jun 11, 2013 6:14 am    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 27

hi it is actually a exercise I was given so

here is all my code:
qm1:
DEFINE QLOCAL(QM1.DEADQ) DESCR('Dead Letter Queue for QM1') MAXDEPTH (9999)
DEFINE LISTENER(LISTENER.TCP) TRPTYPE(TCP) CONTROL(QMGR) PORT(1414)
START LISTENER(LISTENER.TCP)
DEFINE QLOCAL(TO.QM5) USAGE(XMITQ)
DEFINE QREMOTE (QR1) RNAME(QL1) RQMNAME(QM5) XMITQ(TO.QM5)
DEFINE QREMOTE(QM5) RQMNAME(QM5) XMITQ(TO.QM5)
DEFINE CHANNEL (QM1.QM2) CHLTYPE(SDR) TRPTYPE(TCP) CONNAME('LOCALHOST(1415)') XMITQ(TO.QM5)
START CHANNEL(QM1.QM2)
DEFINE QLOCAL(QL2)
DEFINE CHANNEL(QM2.QM1) CHLTYPE(RCVR) TRPTYPE(TCP)

qm2:

DEFINE QLOCAL(QM2.DEADQ) DESCR('Dead Letter Queue for QM2') MAXDEPTH (9999)
DEFINE LISTENER(LISTENER.TCP) TRPTYPE(TCP) CONTROL(QMGR) PORT(1415)
START LISTENER(LISTENER.TCP)
DEFINE QLOCAL(QM5) USAGE(XMITQ)
DEFINE CHANNEL(QM1.QM2) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE CHANNEL (QM2.QM3) CHLTYPE(SDR) TRPTYPE(TCP) CONNAME('LOCALHOST(1416)') XMITQ(QM5)
START CHANNEL (QM2.QM3)
DEFINE QLOCAL(QM1) USAGE(XMITQ)
DEFINE CHANNEL(QM3.QM2) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE CHANNEL (QM2.QM1) CHLTYPE(SDR) TRPTYPE(TCP) CONNAME('LOCALHOST(1414)') XMITQ(QM1)
START CHANNEL (QM2.QM1)

qm3:
DEFINE QLOCAL(QM3.DEADQ) DESCR('Dead Letter Queue for QM3') MAXDEPTH (9999)
DEFINE LISTENER(QM1.LISTENER) TRPTYPE(TCP) CONTROL(QMGR) PORT(1416)
START LISTENER(QM1.LISTENER)
DEFINE QLOCAL(QM5) USAGE(XMITQ)
DEFINE CHANNEL(QM2.QM3) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE CHANNEL (QM3.QM4) CHLTYPE(SDR) TRPTYPE(TCP) CONNAME('LOCALHOST(1417)') XMITQ(QM5)
START CHANNEL (QM3.QM4)
DEFINE QLOCAL(QM1) USAGE(XMITQ)
DEFINE CHANNEL(QM4.QM3) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE CHANNEL (QM3.QM2) CHLTYPE(SDR) TRPTYPE(TCP) CONNAME('LOCALHOST(1415)') XMITQ(QM1)
START CHANNEL (QM3.QM2)

qm4:
DEFINE QLOCAL(QM4.DEADQ) DESCR('Dead Letter Queue for QM4') MAXDEPTH (9999)
DEFINE LISTENER(QM3.LISTENER) TRPTYPE(TCP) CONTROL(QMGR) PORT(1417)
START LISTENER(QM3.LISTENER)
DEFINE QLOCAL(QM5) USAGE(XMITQ)
DEFINE CHANNEL(QM3.QM4) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE CHANNEL (QM4.QM5) CHLTYPE(SDR) TRPTYPE(TCP) CONNAME('LOCALHOST(1418)') XMITQ(QM5)
START CHANNEL (QM4.QM5)
DEFINE CHANNEL(QM5.QM4) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE QLOCAL(QM1) USAGE(XMITQ)
DEFINE CHANNEL (QM4.QM3) CHLTYPE(SDR) TRPTYPE(TCP) CONNAME('LOCALHOST(1416)') XMITQ(QM1)
START CHANNEL (QM4.QM3)

qm5:
DEFINE QLOCAL(QM5.DEADQ) DESCR('Dead Letter Queue for QM5') MAXDEPTH (9999)
DEFINE LISTENER(QM3.LISTENER) TRPTYPE(TCP) CONTROL(QMGR) PORT(1418)
START LISTENER(QM3.LISTENER)
DEFINE CHANNEL(QM4.QM5) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE QLOCAL(QM5.INITQ)
DEFINE PROCESS(ECHO) APPLICID('amqsech')
DEFINE QLOCAL(QL1) TRIGGER TRIGTYPE(FIRST) PROCESS(ECHO) INITQ(QM5.INITQ)
DEFINE QMODEL(QM5.MODEL.REPLY)
DEFINE QLOCAL(TO.QM1) USAGE(XMITQ)
DEFINE QREMOTE (QR2) RNAME(QL2) RQMNAME(QM1) XMITQ(TO.QM1)
DEFINE QREMOTE(QM1) RQMNAME(QM1) XMITQ(TO.QM1)
DEFINE CHANNEL (QM5.QM4) CHLTYPE(SDR) TRPTYPE(TCP) CONNAME('LOCALHOST(1417)') XMITQ(TO.QM1)
START CHANNEL(QM5.QM4)

the screenshot for runmqtrm and amqsreq
C:\>AMQSREQ QR1 QM1 QL2
Sample AMQSREQ0 start
server queue is QR1
replies to QL2
HI


C:\B>RUNMQTRM -m QM5 -q QM5.INITQ
5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED.
12/06/2013 00:06:31: WebSphere MQ trigger monitor started.

__________________________________________________
12/06/2013 00:06:31: Waiting for a trigger message

"amqsech "TMC 2QL1 ECHO

amqsech





QM5
" "
Sample AMQSECHA start
HI
MQGET ended with reason code 2033
Sample AMQSECHA end
12/06/2013 00:07:32: End of application trigger.

looks like it is actually echoing the message i put. maybe cuz of qma i set up before. thats my only guess thanks guys for all the help. still bit confused thou.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 11, 2013 6:23 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

lozaza wrote:
hi it is actually a exercise I was given so


And you believe that the person who gave you this 'exercise' isn't reading this thread, and doesn't know that you only accomplished it because you got other people to help you, rather than by learning it yourself?

And you believe that learning this through this method will leave you adequately prepared when the pager goes off at 2 am and you have to find out why someone isn't getting their messages?

Are you sure you understood the point of the exercise you were given?
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Jun 11, 2013 6:26 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

OK, just to ensure I'm seeing what I think I'm seeing?

amqsreq -> QM1 -> QM2 -> QM3 -> QM4 -> QM5 -> amqsech

You then expect a reply back to QL2 in QM1?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
lozaza
PostPosted: Tue Jun 11, 2013 6:45 am    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 27

Yeah. message can go throu from qm1 to qm5 then give a reply at ql2 on qm1.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General Discussion » setup amqsech to test triggering
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.