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 » User Exits » Using Message Exits

Post new topic  Reply to topic Goto page 1, 2  Next
 Using Message Exits « View previous topic :: View next topic » 
Author Message
ajayvizag
PostPosted: Thu Aug 27, 2009 12:54 am    Post subject: Using Message Exits Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

Hi All,
Currently in our project we have a set up where in whnever a application puts a message in a queue a trigger monitor invokes an application which takes the message. The application which puts the message in the queue is not accessivble to us but we still want to keep an audit information of the message that was put by the application so without disturbing that application that is making changes to it to log a copy in some other queue.... we are thinking of implementing a message exit which would help us start a applicatiob which will record all the messages that are placed in that queue. I would like to know how can a exit help me and where can i get the required information.

Thanks & Regards
Ajay
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Thu Aug 27, 2009 1:30 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

I'd try and avoid exits where possible but if you insist.... You may be able to look at the mirrorq sample for guidance (note this is not production code but may help you moving forwards).

Also depending on your version of MQ it seems you can use pub / sub for such a requirement if you're on the latest version and i've no experience of this.
Back to top
View user's profile Send private message
ajayvizag
PostPosted: Thu Aug 27, 2009 3:13 am    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

Thanks for the suggesrtion forgot to mention that the application is written in java is there any java program that does the job of mirrorq.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 27, 2009 4:50 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ajayvizag wrote:
is there any java program that does the job of mirrorq.


Message exits can't be written in Java.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ajayvizag
PostPosted: Thu Aug 27, 2009 5:31 am    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

Did u mean that none of the exits can be written in java. If so what are the supported languages.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 27, 2009 5:39 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ajayvizag wrote:
Did u mean that none of the exits can be written in java. If so what are the supported languages.


User exits are written in C because they run as part of the queue manager (simplistically). This is what makes a poorly written one so dangerous.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 27, 2009 5:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Moving back to your original question, I'd search this forum for some of the discussions around auditing and message copy. It's not the first time this has come up and you may find some of the discussions helpful.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ajayvizag
PostPosted: Thu Aug 27, 2009 9:23 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

I tried using the mirrorq utility and it actually address my requirement. I was able to see it successfully place the message in one more queue in windows but the AIX installable is not working fine. It gives the following error "AMQ7214:The module for API Exit 'mirrorq' could not be loaded"
Back to top
View user's profile Send private message
ajayvizag
PostPosted: Thu Aug 27, 2009 11:10 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

I checked the error log and it said the mirror_r is a 32 bit library and a 64 bit library is required any help?
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Fri Aug 28, 2009 12:00 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

ajayvizag wrote:
I checked the error log and it said the mirror_r is a 32 bit library and a 64 bit library is required any help?


Recompile with 64 bit libraries?
Back to top
View user's profile Send private message
ajayvizag
PostPosted: Fri Aug 28, 2009 2:44 am    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

I am getting the below error when i am trying to restart my QM after configuring the exit in UNix....

"failed to load as it is probably a 32-bit library,
a 64-bit library is required. The following message gives details of the
original failure."

"The system could not dynamically load the shared library
'/var/mqm/exits64/mirrorq_r'. The system returned error message
''/var/mqm/exits64/mirrorq_r' is not a valid load module: Bad magic number'.'

"The module for API Exit 'mirrorq_test' could not be loaded.

EXPLANATION:
The module '/var/mqm/exits64/mirrorq_r' for API Exit 'mirrorq_test' could not
be loaded for reason xecU_S_LOAD_FAILED.
ACTION:
Correct the problem with the API Exit module 'mirrorq_test"
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Fri Aug 28, 2009 4:26 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

please show us how you compiled the exit

please show us how you specified the exit in the qmgr
_________________
Regards, Butcher
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Aug 28, 2009 7:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ajayvizag wrote:
I tried using the mirrorq utility and it actually address my requirement. I was able to see it successfully place the message in one more queue in windows but the AIX installable is not working fine. It gives the following error "AMQ7214:The module for API Exit 'mirrorq' could not be loaded"


Let's be quite clear here, not just for you but for future readers of this post - mirrorq is not a utility it's a sample only. It's not supported like the other IBM WMQ utilities and the sample code is not considered to be production strength even when it works.

So even on Windows (where the supplied sample works) if it causes any issues in your environment then it'll be on you to resolve them. This is particually important as you need to change & recompile it for the 64-bit AIX environment - this makes it your code and your problem.

Obviously you can get help from this forum. Be sure to mention to your site management that this component of your environment is being supported not by IBM but a bunch of part-time strangers on the net.

Also be aware that exits can affect queue manager performance badly, to the point a badly compiled or linked exit can crash a queue manager. This is important if maintenance is applied to the underlying OS, which might require changes and/or relinking of an exit.

User exits are considered an advanced WMQ topic, and should not be taken lightly.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Cressida
PostPosted: Sun Aug 30, 2009 12:45 am    Post subject: Reply with quote

Disciple

Joined: 13 Jul 2007
Posts: 154

We think that API Exits are not voodoo, nor taboo, nor ....

And since this mirrorq thing still keeps coming up : Have a look at
SynQuest It is a professionally developed, no user C or API Exit coding required, multi-platforms supported, performance optimized and efficient, vendor provided and supported mirrorq like functionality.

And while still available, register to download the special package done for developerWorks and MQSeries.net community found here Special Package
Back to top
View user's profile Send private message
ajayvizag
PostPosted: Mon Aug 31, 2009 6:33 am    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

Thaank u all for the help that u guys have provided i was able to compile the mirrorq in 64 bit but now my runmqsc command is not working.
The following error message is display on the console "AMQ9508: Program cannot connect to the queue manager."
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 » User Exits » Using Message Exits
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.