MamdaSubscription question - no updates for MAMA_MSG_TYPE_UPDATE


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

Hi,
 
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.
 
regards,
 
Aidan Russell
Quoting Systems Development
Unicredit
 
0049 89 378 12843
 
 
 


Mark O'Callaghan
 

Russell,

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).

Mark

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

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.

regards,

Aidan Russell
Quoting Systems Development
Unicredit

0049 89 378 12843




_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev


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.

regards,
Aidan

-----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

Russell,

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).

Mark

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

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.

regards,

Aidan Russell
Quoting Systems Development
Unicredit

0049 89 378 12843




_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev