Re: MamdaSubscription question - no updates for MAMA_MSG_TYPE_UPDATE

Russell Aidan (Ext. - UniCredit Business Integrated Solutions) <aidan.russell.extern@...>

Hi Mark,

Thanks for the response. My programs are actually the mamdapublisher and mamdalistener from the examples. I found I had to make some small changes to get these working.

So I use the addMamaHeaderFields method (unchanged) in the publisher - however I found changing the msgType in the addMamaHeaderFields to INITIAL causes the client MamdaMsgListener::onMsg callback to be invoked for each message, but UPDATE msgType do not invoke the client callback.

//addMamaHeaderFields (mPublishMsg, MAMA_MSG_TYPE_QUOTE, MAMA_MD_MSG_TYPE_QUOTE, MAMA_MSG_STATUS_OK); // fails !!!
//addMamaHeaderFields( mPublishMsg, MAMA_MSG_TYPE_UPDATE, MAMA_MD_MSG_TYPE_GENERAL, MAMA_MSG_STATUS_OK ); // fails !!!
addMamaHeaderFields( mPublishMsg, MAMA_MSG_TYPE_INITIAL, MAMA_MD_MSG_TYPE_GENERAL, MAMA_MSG_STATUS_OK ); // works !!!

The only difference in the msg content sent is the msgType above.


-----Original Message-----
From: Mark O'Callaghan [mailto:mjocalla@...]
Sent: Wednesday, July 18, 2012 10:44 PM
To: Russell Aidan (Ext. - UniCredit Business Integrated Solutions)
Cc: openmama-dev@...
Subject: Re: [Openmama-dev] MamdaSubscription question - no updates for MAMA_MSG_TYPE_UPDATE


Take a look at mamda/c_cpp/src/examples/mamdapublisher.cpp
(specifically MamdaPublisher::addMamaHeaderFields).

I think your issue is that you need to add more header fields, afaik at a minimum you need the message type and the message status (although it could be more).


On 18 July 2012 17:51, Russell Aidan (Ext. - UniCredit Business Integrated Solutions) <aidan.russell.extern@...> wrote:

I wonder if anyone has come across this MAMDA publisher/listener behaviour ?

I wrote a simple test MAMDA listener and publisher. In the listener I
create a simple MamdaSubscription, using defaults for
subscription-type and service (NORMAL & REAL_TIME).

In my test publisher I send an update message for the subscribed
symbol from a timer. However the client listener receives only
messages with msgType MAMA_MSG_TYPE_INITIAL; messages with msgType
MAMA_MSG_TYPE_UPDATE do not invoke the onMsg callback. I set the
msgType in the send message using fid 1.


Aidan Russell
Quoting Systems Development

0049 89 378 12843

Openmama-dev mailing list

Join to automatically receive all group messages.