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 IBM MQ Support » Urgent!!! - Help required on message exit

Post new topic  Reply to topic
 Urgent!!! - Help required on message exit « View previous topic :: View next topic » 
Author Message
leo>
PostPosted: Tue Dec 21, 2004 2:05 am    Post subject: Urgent!!! - Help required on message exit Reply with quote

Apprentice

Joined: 06 Oct 2004
Posts: 42

Hi All,

We have a requirement to build a message exit to get a copy of whatever message that passes through the channel for journaling. Message exit is to be bound to a receiver channel.

Also we are supposed to insert a fixed-length string to the start of the message, so we need to modify the message that passes through the channel.

To insert the data into the message passing through the channel we were doing the below steps

1. Check whether enough space allocated in agent buffer (pAgentBuffer - in/out parameter to exit), by checking the length of the
agent buffer (pAgentBufferLength - in parameter to exit). The assumption was MCA will allocate memory more than the actual data length and give reference to the allocated memory length as pAgentBufferLength and reference to actual data length as pDataLength.

2. But the issue is for both Agent Buffer Length (*pAgentBufferLength) and Data Length (*pDataLength), we are getting the same value.


Because of this, we don’t have space to insert our data in agent buffer.

Can you please explain

1. Whether our assumption is correct?

2. In what scenario, the pAgentBufferLength and pDataLength are same?

3. Can there be any configuration changes to be done either to the channel to get more space for the agent buffer?

4. Is there any other way to insert data to the message passing through the channel using a message exit?


Any help on this would be appreciated...

Thanks in advance.
Leo
_________________
IBM Certified System Administrator - Websphere MQ V5.3
Back to top
View user's profile Send private message
Nigelg
PostPosted: Tue Dec 21, 2004 5:26 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

This is covered in the Intercomms manual, but it is not very clear.

1. Your assumption is right.
2. This is not known. The book just says that AgentBufferLength can be greater than DataLength.
3. No.
4. Yes.
Create some storage in your exit, put your new fixed string at the start of the storage and the rest of the msg (for DataLength from AgentBuffer) after the fixed string. Set the pointer to your storage into ExitBufferAddr that was passed into the exit, and set ChannelExitParms.ExitResponse2 to MQXR2_USE_EXIT_BUFFER.
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Tue Dec 21, 2004 5:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

Removed post myself as it was similar, but not a reponse to this question
_________________
Michael



MQSystems Facebook page


Last edited by Michael Dag on Wed Dec 22, 2004 5:26 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
leo>
PostPosted: Tue Dec 21, 2004 8:29 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Oct 2004
Posts: 42

Hi Nigelg,

Thanks a lot for your immediate reply.

Is it advisable allocating memory in the message exit area to store the messages and make use of it?

Thanks & Regards,
Leo
_________________
IBM Certified System Administrator - Websphere MQ V5.3
Back to top
View user's profile Send private message
Nigelg
PostPosted: Tue Dec 21, 2004 9:57 pm    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

Yes, you can do that.
You can get the memory when the exit is called for init, ExitReason MQXR_INIT, and free the memory when ExitReason is MQXR_TERM. the memory is private to the channel instance.
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 IBM MQ Support » Urgent!!! - Help required on message 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.