|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Event Broker channel exit |
« View previous topic :: View next topic » |
Author |
Message
|
mkong66 |
Posted: Mon Jun 23, 2003 2:06 pm Post subject: Event Broker channel exit |
|
|
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 |
|
 |
rwa |
Posted: Tue Jun 24, 2003 12:15 am Post subject: |
|
|
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 |
|
 |
mkong66 |
Posted: Mon Jun 30, 2003 11:29 am Post subject: |
|
|
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 |
|
 |
rwa |
Posted: Mon Jun 30, 2003 10:56 pm Post subject: |
|
|
Voyager
Joined: 22 Jan 2002 Posts: 76 Location: Duesseldorf/Germany
|
|
Back to top |
|
 |
rwa |
Posted: Tue Jul 01, 2003 5:39 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|