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 API Support » how to catch whole message with svrconn exit?

Post new topic  Reply to topic
 how to catch whole message with svrconn exit? « View previous topic :: View next topic » 
Author Message
JAKEZ
PostPosted: Mon Oct 25, 2004 8:16 am    Post subject: how to catch whole message with svrconn exit? Reply with quote

Apprentice

Joined: 03 Oct 2002
Posts: 32

Hi,

- on a sun solaris box mqseries server we would like to catch the whole message using a receive exit for a SVRCONN channel to be able to modify the message before the svrconn MCA puts it in the destination queue on the server:

+ is it possible to use just a receive exit at the svrconn end - without unsing a send exit at the clntconn end?

+ in that case is it possible to only define the client channel at the client box with the MQSERVER variable?

thanks a lot for help
Jakez
Back to top
View user's profile Send private message
Nigelg
PostPosted: Mon Oct 25, 2004 11:35 pm    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

You an just use a receive exit at the server end, but that will not get yoiu what you want. The data passed to the receive exit by the MCA is not a msg, but the entire transmission. You will need to parse your msg out of the data, and the complete msg may not be present.
Back to top
View user's profile Send private message
JAKEZ
PostPosted: Mon Oct 25, 2004 11:48 pm    Post subject: Reply with quote

Apprentice

Joined: 03 Oct 2002
Posts: 32

thanks guy for replying,

- what do you mean when you say that the data passed to the exit is not a message but the entire transmission?

- because of beeing a client channel we cannot have the MQXQH transmission header (right?) but can we get the MQMD message header AND the message data?

Jakez
Back to top
View user's profile Send private message
Nigelg
PostPosted: Tue Oct 26, 2004 12:49 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

A receive exit is called by the MCA immediately after the data has been taken off the wire. The data passed to the exit is all the data that has been received, i.e. it includes all the WMQ header information, and then the data necessary for the API call to be made on the server.

The type of MQI call that the client has made is indicated by byte 10 of the TSH header, and there is a list of the types in the Intercomms manual in table 52, Idenifying API calls. Since you want to intercept a msg before it is put to a queue on the server, I expect you want to check only the MQPUT request calls, where byte 10 is x86.

Following the TSH is the call specific data. For an MQPUT this is the MD and PMO, and then probably the msg data itself. If the put is to a distribution list rather than a plain queue, the list of qmgr/queue pairs is also in the header data before the msg data.

The format of the client data flows is not published by IBM, so you have to find the start of the MD, PMO, and the msg data. The msg data may be split across 2 or more transmissions if the header + msg length is more than the WMQ transmission length (37266).

I suggest you start by coding send and receive exits in the SVRCONN channel which dump the data flows. When you are confident that you can identify the flows which contain msg data, and the position of the msg data in the flows, then you can manipulate the msg data as you want.
Back to top
View user's profile Send private message
markt
PostPosted: Tue Oct 26, 2004 4:24 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 508

You can use an API exit that runs at the SVRCONN end of the channel. It is easy, from within an API Exit, to determine whether it is running inside a SVRCONN proxy or inside some other environment. So that has full access to all the message data as part of the client's MQPUT or MQGET.
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 API Support » how to catch whole message with svrconn 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.