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 » Event Broker channel exit

Post new topic  Reply to topic
 Event Broker channel exit « View previous topic :: View next topic » 
Author Message
mkong66
PostPosted: Mon Jun 23, 2003 2:06 pm    Post subject: Event Broker channel exit Reply with quote

Newbie

Joined: 23 Jun 2003
Posts: 5

I am currently developing a exit in the EventBroker (pub/sub) environment. The purpose of the exit is to replicate the in/out messages to a local queue. The exit is setup to the SVRCONN channel other PUB/SUB clients use. The problem I am facing is that there are some unknown system messages go in or out from the SVRCONN channel whenever a subscriber or a publisher is connected to the broker. The messages look like heartbeats since the same message appear every 5 seconds. The MQMD of these messages are not different from the actual application messages. I don't want to replicate these system messages and can't find a way to distinguish them from the actual messages. Can you please offer me some advise? Thanks.

MKONG
Back to top
View user's profile Send private message AIM Address
rwa
PostPosted: Tue Jun 24, 2003 12:15 am    Post subject: Reply with quote

Voyager

Joined: 22 Jan 2002
Posts: 76
Location: Duesseldorf/Germany

1) Use MsgID and CorrelID to find only your messages (description can be found in every send/reply example)

2) if your subscribers/publishers are not running with the same userid as the queue manager the useridentifier field could be used

3) use a subscriber to replicate

4) I am not very familiar with exits, but can your exit be bound to a queue instead? This should prevent replicating the heartbeats and other system messages.

...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mkong66
PostPosted: Mon Jun 30, 2003 11:29 am    Post subject: Reply with quote

Newbie

Joined: 23 Jun 2003
Posts: 5

Thanks rwa for your reply, I also posted my question to the IBM support, here is their answers:

1. The 'unknown dataflow' every 5 seconds.
The MQ Series implementation of JMS pubsub allows the
subscriber to 'poll' for new messages. There are also other
internal dataflows that MQ JMS uses. These are proprietory
information.
2. The use of channel exits in this manner is unconventional.
Channels exits are normally there to provide either encryption
or compression facilities not for examiniation and
interpretation of the data.
If you look at the channel exit documentation in the MQSeries
Intercommunication guide you will see that the pAgentBuffer
format is not defined. The format of these buffers is liable to
change and the customer advised not to rely on any specific
format within the buffer.

I don't believe message replication on the channel level is "unconventional". The way I get the MQMD in the channel program is as follows, the problem is I just can't read the MQMD correctly, there are unreadable characters all over the place as I tried to print the content of the MQMD. It seems that I am not reading the AgentBuffer from the right position. I setup the program as a RCVEXIT of a SVRCONN channel. Can someone please help. Thanks alot.

void MQENTRY MsgExit ( PMQCXP pChannelExitParams
PMQCD pChannelDefinition,
PMQLONG pDataLength,
PMQLONG pAgentBufferLength,
PMQBYTE pAgentBuffer,
PMQLONG pExitBufferLength,
PMQPTR pExitBufferAddr)
{
.....
MQXQH *pMQXQH;
MQMD *pMQMD;


switch ( pChannelExitParams->ExitReason )
{
case MQXR_XMIT:
pMQXQH = (MQXQH*)pAgentBuffer;
pMQMD = (MQMD *)&pMQXQH->MsgDesc;

/*** print the pMQMD content *********/
.....

offset = sizeof(MQXQH);
buflen = &pAgentBufferLength - offset;

if (buflen > 0)
{
pAgentBuffer = pAgentBuffer + offset;
printf("%s\n", AgentBuffer);
/**** see some junks from the msg ***/
/**** portion of the buffer ***/
}
default:
....
}
....
}
Back to top
View user's profile Send private message AIM Address
rwa
PostPosted: Mon Jun 30, 2003 10:56 pm    Post subject: Reply with quote

Voyager

Joined: 22 Jan 2002
Posts: 76
Location: Duesseldorf/Germany

Hi Mkong,

I also don't believe that message replication on the channel level is "unconventional".

And I found an example that looks very much like the things you want to do from IBM in SupportPac MA06

http://www-3.ibm.com/software/integration/support/supportpacs/individual/ma06.html

Regards,

rwa
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rwa
PostPosted: Tue Jul 01, 2003 5:39 am    Post subject: Reply with quote

Voyager

Joined: 22 Jan 2002
Posts: 76
Location: Duesseldorf/Germany

add:

The RCVExit does not send MQMD or the message text to the exit function. Only the transmission data (MQXQH) is send to the exit call.

So the call pMQMD = (MQMD *) &pMQXQH->MsgDesc will not work.

More info can be found in
MQSeries Intercommunication Guide
and
MQSeries Application Reference Guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Event Broker channel 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.