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 » Detecting MQ operations on client connection

Post new topic  Reply to topic
 Detecting MQ operations on client connection « View previous topic :: View next topic » 
Author Message
yashgt
PostPosted: Tue Dec 01, 2015 4:10 pm    Post subject: Detecting MQ operations on client connection Reply with quote

Apprentice

Joined: 11 Nov 2014
Posts: 38

Hi,

Imagine an application(A1) running on a server(S1) makes a client connection to a Queue Manager(QM1) running on a different server(S2). Is it possible to extend the functionality of Queue Manager so that when the application makes a MQGET or MQPUT call on a queue on the Queue Manager, a message can be logged to a log file or some custom action can be performed?

Thanks,
Yash
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Dec 01, 2015 10:45 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Yes

Passed the exam yet?

If this is a real life question please use some real examples. There is even a specific section of this site devoted to the subject. But... let me give you a warning.

Unless you are really, really experienced in MQ and MQ App development, you really don't want to go down this path. You could even crash the Queue manager and all the other users would really not appreciate it.

I've been using MQ (and developing apps) for 16 years now. Even with my experience I tread very carefully when working in this area.

{Please note that I have deliberately not mentioned the answer to the OP's question. As I said at the start, I get the feeling that this is some sort of exam question}
Please prove me wrong in my assumption.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 02, 2015 6:16 am    Post subject: Reply with quote

Grand High Poobah

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

It's probably an extension of this rather than an exam question.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 02, 2015 6:24 am    Post subject: Re: Detecting MQ operations on client connection Reply with quote

Grand High Poobah

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

yashgt wrote:
Imagine an application(A1) running on a server(S1) makes a client connection to a Queue Manager(QM1) running on a different server(S2). Is it possible to extend the functionality of Queue Manager so that when the application makes a MQGET or MQPUT call on a queue on the Queue Manager, a message can be logged to a log file or some custom action can be performed?


The only way the functionality of a queue manager can be "extended" is by the use of an exit, an example of which is described in your other post. As intimated there, poor use of exits (or exit functions) can bring down the queue manager in the same way it can bring down an application.

Also consider that even if an exit works "properly", if you add an exit to the queue manager to log the message to a file, you're immediately making the queue manager thread wait on the file I/O to be completed, introducing delay and latency into the process. This is worse if the "custom action" involves any kind of database or web service access. Exits should be small, lean, and complete their processing in milliseconds.

Your problems get worse if the exit processing fails (e.g. the disc fills or the log file is temporarily held by another process - like another copy of your exit!). Now you've made the message operation fail, assuming you can recover and don't bring down the queue manager.

As my worthy associate correctly says, this is a path you should avoid unless you know a lot about MQ and even more about coding. This is an advanced topic.

Meet the requirement to "log" messages (or perform custom actions) with one of the more traditional methods often discussed here that suits your needs.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » General Discussion » Detecting MQ operations on client connection
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.