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 » Clustering » API Exits & Cluster Queues

Post new topic  Reply to topic
 API Exits & Cluster Queues « View previous topic :: View next topic » 
Author Message
aboggis
PostPosted: Wed May 05, 2004 10:26 am    Post subject: API Exits & Cluster Queues Reply with quote

Centurion

Joined: 18 Dec 2001
Posts: 105
Location: Auburn, California

I am trying to set up some logging of messages (for app/environment debugging purposes) within my MQ cluster. So, using the sample package found at [1], I set up a test.

http://www.developer.ibm.com/tech/sample_code_handler.pl?action=download&object=/tech/sample_code/mq/mirrorq_sun.tar.Z

On QM1, I created MIRRORQ.IN & MIRRORQ.COPY. The COPY queue is shared in the cluster. I created a namelist as specified in the documentation for this package.

I added the entries to the qm.ini and restarted the queue manager.

I tested the process by locally putting a message to MIRRORQ.IN. Everything works fine. I went to another queue manager in the cluster (QM2) and did a test put to MIRRORQ.IN.

The message is successfully put to the MIRRORQ.IN, but is not copied by the API exit to the COPY queue.

Can anyone suggest why?

I surmise that a different process ends up putting the message depending on whether the put is as a result of a cluster put of a local put - but surely is ends up being a MQPUT regardless?
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
clindsey
PostPosted: Wed May 05, 2004 5:31 pm    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

Look for this section of code in mirrorq.c and comment out these lines.
Code:

   /**********************************************************/
   /* Since this exit' purpose is to copy messages written   */
   /* to application Queues, do not register any functions   */
   /* when the process is an MQ Internal process             */
   /**********************************************************/
   if (pExitParms->APICallerType == MQXACT_INTERNAL)
   {
      rc = MQXCC_SKIP_FUNCTION;
   }



Then rebuild the shared lib. The source and make file are included in the package. If you have any trouble getting it built, send me an email at clindsey@us.ibm.com

Charlie
Back to top
View user's profile Send private message
aboggis
PostPosted: Wed May 05, 2004 11:40 pm    Post subject: Reply with quote

Centurion

Joined: 18 Dec 2001
Posts: 105
Location: Auburn, California

Buggrit

I looked thru the code and completely missed that.

Thanks for the pointer. Now all I have to do is find an environment with a compliler.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
MB
PostPosted: Fri Jun 25, 2004 11:55 am    Post subject: Facing a problem with mirrorq API Exit on AIX Reply with quote

Acolyte

Joined: 25 Jun 2004
Posts: 52

Hi,

I am trying to use the mirrorq API Exit (available in IBM site) on AIX.

Initially, after compilation, I linked with libraries meant for non-threaded version of the shared object. Then the exit worked fine with this shared object 'mirrorq'.

Then, while linking I used the libraries meant for multi-threaded version (the ones with '_r') to get another shared object 'mirrorq_r'. I modified the Exits stanza of the QM.ini file to replace mirrorq with mirrorq_r.
Now, when I issue strmqm on the Queue Manager, I get a response -

AMQ7214: The module for API Exit 'MirrorQ' could not be loaded.

The log for the Queue Manager says -

AMQ7214: The module for API Exit 'MirrorQ' could not be loaded.
EXPLANATION:
The module '/var/mqm/exits/mirrorq_r' for API Exit 'MirrorQ' could not be
loaded for reason xecU_I_FUNCTION_NOT_FOUND.
ACTION:
Correct the problem with the API Exit module 'MirrorQ'.


Does anyone have a clue on why this happens?

Then, I replaced the Exit 'mirrorq_r' with 'mirrorq' in the QM.ini file. I still get the same error messages at the shell prompt and in the log files. (I removed all traces mirrorq_r and still got the same errors).

Any info on why this happens and how to solve this will be of great help.

Thanks & Regds,

~ MB
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Fri Jun 25, 2004 12:17 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3253
Location: London, ON Canada

I am no AIX expert but I have read about this before. It is confusing, and you are getting tripped up.

You don't put mirrorq_r in the exit name. You put mirrorq regardless if it is for shared vs non-shared libraries. Also, you either put 1 or both exits (I can't remember) in the exit directory and the system will pick the appropriate one.

Remember, you must always recycle the queue manager to pick up the new API Exit after you have compiled/linked it.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
MB
PostPosted: Fri Jun 25, 2004 12:56 pm    Post subject: Reply with quote

Acolyte

Joined: 25 Jun 2004
Posts: 52

Roger,

Thank you for the Response.

Actually, I gave different names to the shared objects in the makefile for threaded vs non-threaded versions. So, I have two different shared objs - mirrorq and mirrorq_r. I think it is this shared obj name that we mention in the QM.ini file.

Anyways, I tried what you said and it still gave me the same error.

For now, I am specifying only one exit at a time in the QM.ini file.

Yes, I stop the Queue Manager, change the QM.ini and try to restart it again. But the QM still doesn't start with this Exit defined in QM.ini

Regards.
Back to top
View user's profile Send private message
clindsey
PostPosted: Fri Jun 25, 2004 1:20 pm    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

MB,

When you untar the package from the download site, it already includes the threaded and non-threaded binaries. You can use these without the need to compile. The instructions for setting it up are included in the prologue of mirrorq.c. Follow the setup step by step and I believe it will work for you.

If you do want to modify the source, I would recommend that you use the make file that is included in the package and it will generate threaded and non-threaded binaries. It also sets the needed entry points. Without this, the lib will not load. You have to copy both of these to the exits directory and then set the name parm in qm.ini to Name=mirrorq

If you still have problems, send me a note at the address given above and include some details about you environment.

FYI, the code on the website will soon be updated with the change noted to become the default action.

Charlie
Back to top
View user's profile Send private message
MB
PostPosted: Fri Jun 25, 2004 2:04 pm    Post subject: Reply with quote

Acolyte

Joined: 25 Jun 2004
Posts: 52

Charlie,
Thank you very much, I put both the shared objs in the exits folder and now it works.
My understanding was not correct that I thought these two shared objs can be used independently.

Roger,
Now I understand why I shouldn't have given mirrorq_r as the exit name in QM.ini file. Thank you.

Regards,
MB.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Clustering » API Exits & Cluster Queues
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.