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 » IBM MQ Installation/Configuration Support » Configure API Exit

Post new topic  Reply to topic
 Configure API Exit « View previous topic :: View next topic » 
Author Message
mqhelpless
PostPosted: Fri Sep 08, 2006 9:19 pm    Post subject: Configure API Exit Reply with quote

Apprentice

Joined: 13 Jul 2005
Posts: 33

I am trying to configure the sample api exit program (amqsaxe.dll) on windows platform, running MQ v6. I've followed the list of instruction as stated :

ApiExitLocal: Sequence=100
Function=EntryPoint
Module=C:\applfolder\amqsaxe.dll
Name=SampleApiExit

and the environment variables as follows :

SET MQAPI_TRACE_LOGFILE=C:\temp\ApiTrace.

Once I'm done with my configuration, I stop/start my QManager. However, I am still not able to generate the trace log. There's no error or anything. Have I missed out on any step?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Sep 09, 2006 3:01 am    Post subject: Reply with quote

Grand High Poobah

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

Does the userId running the qmgr have authority to write to c:\temp?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
wschutz
PostPosted: Sat Sep 09, 2006 3:31 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

I haven't done it in windows (it does work in linux)....where did you SET MQAPI_TRACE_LOGFILE? I would think it needs to be a system evnironment variable and you probably should re-boot the whole machine....

Also, the default trace level isn't very interesting, you might want to set MQAPI_TRACE_OPTIONS (or put a value in ExitData)....
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
mqhelpless
PostPosted: Sun Sep 10, 2006 3:37 am    Post subject: API Exit - MQPUT Before How to get Queue Reply with quote

Apprentice

Joined: 13 Jul 2005
Posts: 33

Thanks for the feedback. I managed to resolve the issue after rebooting the machine ... found that restarting the Qmanager or for this matter the services doesn't help.

Also, I hope you guys can help me with the following issue:
I want to create the API exit such that for messages bound for a particular queue, I want to inspect its content. If it is of a particular topic, I will allow the message to be put into the remote queue. If not, I want to drop it into a temp queue. What I need to know is if I do a PutBefore (i.e. before putting the message into remote queue, API exit is invoked), is it possible for me to know which remote queue it is trying to access? If I do not know this information, I will not be able to determine if the correct subject id is going into the correct remote queue. Thanks.
Back to top
View user's profile Send private message
Nigelg
PostPosted: Mon Sep 11, 2006 12:35 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

You cannot do that in a PutBefore, since the name of he queue is not known at that time.
You could keep a list of object descriptors associated with queue names, and add queues to the list at MQOPEN and remove them at MQCLOSE, then check your list against the OD passed in to the MQPUT.
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
mqhelpless
PostPosted: Wed Sep 13, 2006 6:14 am    Post subject: Reply with quote

Apprentice

Joined: 13 Jul 2005
Posts: 33

thanks for the suggestion. i have another question. say at MQPUT Before, I inspect the content (say Topic ID) of the message and check against a list of valid topic (in dbase or flat file) and found that this particular Topic ID is not meant for this particular queue. I want to then drop the message into a local-queue say 'DLQ'. How can I achieve this change of destination queue a MQPUT Before?
Back to top
View user's profile Send private message
Nigelg
PostPosted: Wed Sep 13, 2006 6:52 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

The hConn, i.e. the connection to the qmgr, is available in an API exit so you can open a queue and put your msg to it with MQOPEN/MQPUT/MQCLOSE, or MQPUT1 might be better.
Then you can fail the Put Before with whatever error you think is most appropriate, e.g. CompCode 2, ReasonCode MQRC_API_EXIT_ERROR, so the msg is not put to the original queue.

THis is just theory; I have not tried it.
Have a go, and report back...
_________________
MQSeries.net helps those who help themselves..
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 » IBM MQ Installation/Configuration Support » Configure API Exit
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.