[PATCH] mama & mamda apps do not flush data to log


Adrienne Ambrose <AAmbrose@...>
 

TESTING:-

Not O/S or middleware specific. 
Checked  example apps, all languages & on different middlewares to confirm that data is now flushed when redirected to file.
Specifically:-

1. mamapublisherc / mamapublishercpp
2. mamasubscriberc / mamasubscribercpp
3. mamainboxc / mamainboxcpp
4. mamaftmemberc / mamaftmembercpp

 

PATCH:- 0003-Mama-Mamda-apps-do-not-flush-data-to-log

From 519e59b5d03f4782a6c134db68c4853620e1e13c Mon Sep 17 00:00:00 2001

From: A Ambrose <aambrose@...>

Date: Thu, 21 Aug 2014 14:06:51 +0100

Subject: [PATCH 3/3] Mama & Mamda apps do not flush data to log

 

Modification to the mama & mamda example applications to flush data when logged to file.

All languages, C, C++, C# & Java.

[OMAMA-278/OMAMA-279]

Signed-off-by: A Ambrose <aambrose@...>

---

mama/c_cpp/src/examples/c/mamaftmemberc.c          |    3 +++

mama/c_cpp/src/examples/c/mamainboxc.c             |    2 ++

mama/c_cpp/src/examples/c/mamaio.c                 |    2 ++

mama/c_cpp/src/examples/c/mamalistenc.c            |    1 +

mama/c_cpp/src/examples/c/mamalistencachedc.c      |    1 +

mama/c_cpp/src/examples/c/mamamultisubscriberc.c   |    2 ++

mama/c_cpp/src/examples/c/mamaproxyc.c             |    2 ++

mama/c_cpp/src/examples/c/mamapublisherc.c         |    2 ++

mama/c_cpp/src/examples/c/mamasubscriberc.c        |    2 ++

.../src/examples/c/mamasymbollistsubscriberc.c     |    1 +

mama/c_cpp/src/examples/cpp/mamaentitlecpp.cpp     |    1 +

mama/c_cpp/src/examples/cpp/mamaftmembercpp.cpp    |    2 ++

mama/c_cpp/src/examples/cpp/mamainboxcpp.cpp       |    2 ++

mama/c_cpp/src/examples/cpp/mamaiocpp.cpp          |    2 ++

.../c_cpp/src/examples/cpp/mamalistencachedcpp.cpp |    1 +

mama/c_cpp/src/examples/cpp/mamalistencpp.cpp      |    1 +

.../c_cpp/src/examples/cpp/mamamsgpublishercpp.cpp |    2 ++

mama/c_cpp/src/examples/cpp/mamaproxycpp.cpp       |    2 ++

mama/c_cpp/src/examples/cpp/mamapublishercpp.cpp   |    2 ++

mama/c_cpp/src/examples/cpp/mamasubscribercpp.cpp  |    2 ++

.../examples/cpp/mamasymbollistsubscribercpp.cpp   |    2 ++

.../MamaMultiSubscriber/MamaMultiSubscriberCS.cs   |    1 +

.../examples/MamaSubscriber/MamaSubscriberCS.cs    |    1 +

.../src/com/wombat/mama/examples/MamaListen.java   |    3 +++

.../wombat/mama/examples/MamaSubscriberJava.java   |    1 +

mamda/c_cpp/src/examples/auctionticker.cpp         |    2 ++

mamda/c_cpp/src/examples/comboticker.cpp           |    2 ++

mamda/c_cpp/src/examples/currencyticker.cpp        |    2 ++

mamda/c_cpp/src/examples/fundamentallisten.cpp     |    2 ++

mamda/c_cpp/src/examples/mamdalisten.cpp           |    2 ++

mamda/c_cpp/src/examples/mamdapublisher.cpp        |    1 +

mamda/c_cpp/src/examples/multipartticker.cpp       |    2 ++

mamda/c_cpp/src/examples/multisecurityticker.cpp   |    2 ++

mamda/c_cpp/src/examples/news/newsticker.cpp       |    2 ++

mamda/c_cpp/src/examples/optionchainer.cpp         |    2 ++

mamda/c_cpp/src/examples/optionview.cpp            |    2 ++

.../src/examples/orderbooks/atomicbookbuilder.cpp  |    2 ++

.../src/examples/orderbooks/atomicbookticker.cpp   |    3 ++-

mamda/c_cpp/src/examples/orderbooks/bookchurn.cpp  |    2 ++

.../src/examples/orderbooks/bookpublisher.cpp      |    1 +

mamda/c_cpp/src/examples/orderbooks/bookticker.cpp |    1 +

mamda/c_cpp/src/examples/orderbooks/bookviewer.cpp |    2 ++

.../examples/orderbooks/listenerBookPublisher.cpp  |    1 +

.../src/examples/orderbooks/test/bookiters.cpp     |    2 ++

.../src/examples/orderbooks/test/bookselftest.cpp  |    2 ++

.../src/examples/orderbooks/test/randomaccess.cpp  |    3 ++-

mamda/c_cpp/src/examples/orderimbalanceticker.cpp  |    2 ++

mamda/c_cpp/src/examples/quoteticker.cpp           |    2 ++

mamda/c_cpp/src/examples/secstatuslisten.cpp       |    2 ++

mamda/c_cpp/src/examples/tradeticker.cpp           |    2 ++

.../examples/MamdaBookTicker/MamdaBookTicker.cs    |    3 +++

.../MamdaExamplesCommon/CommandLineProcessor.cs    |    1 +

.../MamdaOptionChainExample.cs                     |    2 ++

.../mamda/examples/CommandLineProcessor.java       |    1 +

.../mamda/examples/MamdaAtomicBookBuilder.java     |    4 ++++

.../mamda/examples/MamdaAtomicBookTicker.java      |    1 +

.../com/wombat/mamda/examples/MamdaBookTicker.java |    6 ++++++

.../com/wombat/mamda/examples/MamdaListen.java     |    1 +

.../mamda/examples/MamdaOptionChainExample.java    |    2 ++

.../mamda/examples/MamdaOrderImbalanceTicker.java  |    1 +

60 files changed, 111 insertions(+), 2 deletions(-)

 

diff --git a/mama/c_cpp/src/examples/c/mamaftmemberc.c b/mama/c_cpp/src/examples/c/mamaftmemberc.c

index 40576ce..d5d6f1a 100644

--- a/mama/c_cpp/src/examples/c/mamaftmemberc.c

+++ b/mama/c_cpp/src/examples/c/mamaftmemberc.c

@@ -21,6 +21,7 @@

 #include "mama/mama.h"

#include "string.h"

+#include <stdio.h>

 static mamaTransport    gTransport     = NULL;

static mamaFtMember     gFtMember      = NULL;

@@ -72,6 +73,8 @@ static void MAMACALLTYPE onFtStateChangeCb (mamaFtMember  ftMember,

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

+

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/c/mamainboxc.c b/mama/c_cpp/src/examples/c/mamainboxc.c

index a1ebf99..4a1275e 100644

--- a/mama/c_cpp/src/examples/c/mamainboxc.c

+++ b/mama/c_cpp/src/examples/c/mamainboxc.c

@@ -22,6 +22,7 @@

#include "wombat/port.h"

#include "mama/mama.h"

#include "string.h"

+#include <stdio.h>

 static mamaTransport    gTransport    = NULL;

static mamaInbox        gInbox        = NULL;

@@ -94,6 +95,7 @@ static void createIntervalTimer (void)

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine(argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/c/mamaio.c b/mama/c_cpp/src/examples/c/mamaio.c

index 2f6a9d6..d092ad3 100644

--- a/mama/c_cpp/src/examples/c/mamaio.c

+++ b/mama/c_cpp/src/examples/c/mamaio.c

@@ -34,6 +34,7 @@

#include <sys/types.h>

#include <errno.h>

#include <string.h>

+#include <stdio.h>

 #include "mama/mama.h"

#include "mama/io.h"

@@ -57,6 +58,7 @@ ioCallback          (mamaIo io, mamaIoType ioType, void *closure);

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/c/mamalistenc.c b/mama/c_cpp/src/examples/c/mamalistenc.c

index 223746b..6e59e40 100644

--- a/mama/c_cpp/src/examples/c/mamalistenc.c

+++ b/mama/c_cpp/src/examples/c/mamalistenc.c

@@ -322,6 +322,7 @@ int main (int argc, const char **argv)

     gSubscriptionList = (mamaSubscription*)calloc (MAX_SUBSCRIPTIONS,

                                                    sizeof (mamaSubscription));

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     if (gNumSymbols == 0 && !gPrintVersionAndExit)

diff --git a/mama/c_cpp/src/examples/c/mamalistencachedc.c b/mama/c_cpp/src/examples/c/mamalistencachedc.c

index 8d683b9..db6d3ee 100644

--- a/mama/c_cpp/src/examples/c/mamalistencachedc.c

+++ b/mama/c_cpp/src/examples/c/mamalistencachedc.c

@@ -323,6 +323,7 @@ int main (int argc, const char **argv)

     gSubscriptionList = (mamaSubscription*)calloc (MAX_SUBSCRIPTIONS,

                                                    sizeof (mamaSubscription));

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     if (gNumSymbols == 0 && !gPrintVersionAndExit)

diff --git a/mama/c_cpp/src/examples/c/mamamultisubscriberc.c b/mama/c_cpp/src/examples/c/mamamultisubscriberc.c

index 8282650..85688f0 100644

--- a/mama/c_cpp/src/examples/c/mamamultisubscriberc.c

+++ b/mama/c_cpp/src/examples/c/mamamultisubscriberc.c

@@ -21,6 +21,7 @@

 #include "mama/mama.h"

#include "string.h"

+#include <stdio.h>

#define MAX_BRIDGES 10

 static const char *     gTopic              = "MAMA_TOPIC";

@@ -86,6 +87,7 @@ msgCb (mamaSubscription       subscription,

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     gMamaMiddlewares = (const char**)

                        calloc (MAX_BRIDGES, sizeof (char*));

     gMamaBridges     = (mamaBridge*)

diff --git a/mama/c_cpp/src/examples/c/mamaproxyc.c b/mama/c_cpp/src/examples/c/mamaproxyc.c

index 40ebbb5..988c96b 100644

--- a/mama/c_cpp/src/examples/c/mamaproxyc.c

+++ b/mama/c_cpp/src/examples/c/mamaproxyc.c

@@ -28,6 +28,7 @@

#include "mama/dqpublisher.h"

#include "mama/dqpublishermanager.h"

#include "string.h"

+#include <stdio.h>

 static const char *  gUsageString[] =

{

@@ -285,6 +286,7 @@ syncCallback (mamaTimer timer, void* closure)

int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     gSymbolList = (const char**)calloc (MAX_SUBSCRIPTIONS, sizeof (char*));

     parseCommandLine (argc, argv);

diff --git a/mama/c_cpp/src/examples/c/mamapublisherc.c b/mama/c_cpp/src/examples/c/mamapublisherc.c

index 87e4657..02128fa 100644

--- a/mama/c_cpp/src/examples/c/mamapublisherc.c

+++ b/mama/c_cpp/src/examples/c/mamapublisherc.c

@@ -23,6 +23,7 @@

 #include "mama/mama.h"

#include "string.h"

+#include <stdio.h>

 static mamaTransport    gTransport      = NULL;

static mamaTimer        gTimer          = NULL;

@@ -87,6 +88,7 @@ static void usage               (int exitStatus);

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/c/mamasubscriberc.c b/mama/c_cpp/src/examples/c/mamasubscriberc.c

index e41dfc7..dec55e2 100644

--- a/mama/c_cpp/src/examples/c/mamasubscriberc.c

+++ b/mama/c_cpp/src/examples/c/mamasubscriberc.c

@@ -21,6 +21,7 @@

 #include "mama/mama.h"

#include "string.h"

+#include <stdio.h>

 static mamaTransport    gTransport     = NULL;

static mamaSubscription gSubscription  = NULL;

@@ -95,6 +96,7 @@ static void usage (int  exitStatus);

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/c/mamasymbollistsubscriberc.c b/mama/c_cpp/src/examples/c/mamasymbollistsubscriberc.c

index 6067146..8ffbc60 100644

--- a/mama/c_cpp/src/examples/c/mamasymbollistsubscriberc.c

+++ b/mama/c_cpp/src/examples/c/mamasymbollistsubscriberc.c

@@ -158,6 +158,7 @@ int main (int argc, const char **argv)

                                                    sizeof (mamaSubscription));

 

+    setbuf (stdout, NULL);

     memset(&symbolListCallbacks, 0, sizeof(symbolListCallbacks));

     symbolListCallbacks.onMsg          = symbolListSubscriptionOnMsg;

     symbolListCallbacks.onCreate       = symbolListSubscriptionOnCreate;

diff --git a/mama/c_cpp/src/examples/cpp/mamaentitlecpp.cpp b/mama/c_cpp/src/examples/cpp/mamaentitlecpp.cpp

index 451d414..524492b 100644

--- a/mama/c_cpp/src/examples/cpp/mamaentitlecpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamaentitlecpp.cpp

@@ -1009,6 +1009,7 @@ void MamaEntitle::unsubscribeFromSymbols (void)

int main (int argc, const char** argv)

{

     MamaEntitle  mMamaEntitle;

+    setbuf (stdout, NULL);

     mMamaEntitle.parseCommandLine (argc, argv);

     if (mMamaEntitle.hasSymbols ())

diff --git a/mama/c_cpp/src/examples/cpp/mamaftmembercpp.cpp b/mama/c_cpp/src/examples/cpp/mamaftmembercpp.cpp

index 498fbf2..9c9af9c 100644

--- a/mama/c_cpp/src/examples/cpp/mamaftmembercpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamaftmembercpp.cpp

@@ -25,6 +25,7 @@

#include <mama/log.h>

#include <iostream>

#include <stdlib.h>

+#include <stdio.h>

 using namespace Wombat;

using namespace std;

@@ -77,6 +78,7 @@ private:

  *****************************************************************************/

int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     try

     {

         FtMemberDemo ftDemo;

diff --git a/mama/c_cpp/src/examples/cpp/mamainboxcpp.cpp b/mama/c_cpp/src/examples/cpp/mamainboxcpp.cpp

index c60c426..77d6c70 100644

--- a/mama/c_cpp/src/examples/cpp/mamainboxcpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamainboxcpp.cpp

@@ -39,6 +39,7 @@ using std::cerr;

using std::cout;

using std::endl;

+#include <stdio.h>

#include "mama/mama.h"

#include "mama/mamacpp.h"

@@ -64,6 +65,7 @@ static void sendRequest         (void);

int main (int argc, const char **argv)

{

     int i = 0;

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/cpp/mamaiocpp.cpp b/mama/c_cpp/src/examples/cpp/mamaiocpp.cpp

index 54cf14c..c38d141 100644

--- a/mama/c_cpp/src/examples/cpp/mamaiocpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamaiocpp.cpp

@@ -37,6 +37,7 @@

#include "wombat/port.h"

#include <iostream>

#include <errno.h>

+#include <stdio.h>

 using std::cerr;

using std::cout;

@@ -65,6 +66,7 @@ static void createIOHandlers    (void);

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/cpp/mamalistencachedcpp.cpp b/mama/c_cpp/src/examples/cpp/mamalistencachedcpp.cpp

index b7bd615..23e94b8 100644

--- a/mama/c_cpp/src/examples/cpp/mamalistencachedcpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamalistencachedcpp.cpp

@@ -2020,6 +2020,7 @@ void MamaListen::usage (int exitStatus)

int main (int argc, const char** argv)

{

     MamaListen  mMamaListen;

+    setbuf (stdout, NULL);

     mMamaListen.parseCommandLine (argc, argv);

     if (mMamaListen.hasSymbols ())

diff --git a/mama/c_cpp/src/examples/cpp/mamalistencpp.cpp b/mama/c_cpp/src/examples/cpp/mamalistencpp.cpp

index 69c0035..082d00a 100644

--- a/mama/c_cpp/src/examples/cpp/mamalistencpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamalistencpp.cpp

@@ -1610,6 +1610,7 @@ void MamaListen::usage (int exitStatus)

int main (int argc, const char** argv)

{

     MamaListen  mMamaListen;

+    setbuf (stdout, NULL);

     try

     {

diff --git a/mama/c_cpp/src/examples/cpp/mamamsgpublishercpp.cpp b/mama/c_cpp/src/examples/cpp/mamamsgpublishercpp.cpp

index 7de86f5..c1a7ae0 100644

--- a/mama/c_cpp/src/examples/cpp/mamamsgpublishercpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamamsgpublishercpp.cpp

@@ -19,6 +19,7 @@

  * 02110-1301 USA

  */

+#include <stdio.h>

#include <iostream>

 using std::cerr;

@@ -121,6 +122,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     gBridge = Mama::loadBridge (gMiddleware);

     Mama::open ();

diff --git a/mama/c_cpp/src/examples/cpp/mamaproxycpp.cpp b/mama/c_cpp/src/examples/cpp/mamaproxycpp.cpp

index 283382a..bbb311e 100644

--- a/mama/c_cpp/src/examples/cpp/mamaproxycpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamaproxycpp.cpp

@@ -40,6 +40,7 @@

 #include "wombat/port.h"

#include <iostream>

+#include <stdio.h>

 #include "mama/mama.h"

#include "mama/mamacpp.h"

@@ -530,6 +531,7 @@ void MamaProxy::shutdownMama ()

int main (int argc, const char **argv)

{

     MamaProxy  mMamaProxy;

+    setbuf (stdout, NULL);

     mMamaProxy.parseCommandLine (argc, argv);

    

     try

diff --git a/mama/c_cpp/src/examples/cpp/mamapublishercpp.cpp b/mama/c_cpp/src/examples/cpp/mamapublishercpp.cpp

index 3d3f29a..c180f2b 100644

--- a/mama/c_cpp/src/examples/cpp/mamapublishercpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamapublishercpp.cpp

@@ -39,6 +39,7 @@

  *---------------------------------------------------------------------------*/

 #include <iostream>

+#include <stdio.h>

 #include "mama/mama.h"

#include "mama/mamacpp.h"

@@ -113,6 +114,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     gBridge = Mama::loadBridge (gMiddleware);

diff --git a/mama/c_cpp/src/examples/cpp/mamasubscribercpp.cpp b/mama/c_cpp/src/examples/cpp/mamasubscribercpp.cpp

index dda7f97..ef768e4 100644

--- a/mama/c_cpp/src/examples/cpp/mamasubscribercpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamasubscribercpp.cpp

@@ -35,6 +35,7 @@

  *---------------------------------------------------------------------------*/

 #include <iostream>

+#include <stdio.h>

 #include "mama/mama.h"

#include "mama/mamacpp.h"

@@ -85,6 +86,7 @@ static void usage                       (int exitStatus);

 int main (int argc, const char**  argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

    

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/cpp/mamasymbollistsubscribercpp.cpp b/mama/c_cpp/src/examples/cpp/mamasymbollistsubscribercpp.cpp

index 75ce0e5..774a28c 100644

--- a/mama/c_cpp/src/examples/cpp/mamasymbollistsubscribercpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamasymbollistsubscribercpp.cpp

@@ -23,6 +23,7 @@

#include <iostream>

#include <list>

#include <string.h>

+#include <stdio.h>

 #include <mama/mamacpp.h>

@@ -370,6 +371,7 @@ void MamaSymbolListSubscriber::usage (int exitStatus)

int main (int argc, const char** argv)

{

     MamaSymbolListSubscriber mMamaSymbolListSubscriber;

+    setbuf (stdout, NULL);

     mMamaSymbolListSubscriber.parseCommandLine (argc, argv);

    

     try

diff --git a/mama/dotnet/src/examples/MamaMultiSubscriber/MamaMultiSubscriberCS.cs b/mama/dotnet/src/examples/MamaMultiSubscriber/MamaMultiSubscriberCS.cs

index c4f5606..d0a62a5 100644

--- a/mama/dotnet/src/examples/MamaMultiSubscriber/MamaMultiSubscriberCS.cs

+++ b/mama/dotnet/src/examples/MamaMultiSubscriber/MamaMultiSubscriberCS.cs

@@ -238,6 +238,7 @@ namespace Wombat

                                                                                                  Console.WriteLine(String.Format("{0,20}",field.getAsString()));

                                                                                                  break;

                                                                  }

+                   Console.Out.Flush();

                                                  }

        

                                private void displayAllFields(MamaMsg msg)

diff --git a/mama/dotnet/src/examples/MamaSubscriber/MamaSubscriberCS.cs b/mama/dotnet/src/examples/MamaSubscriber/MamaSubscriberCS.cs

index 39c6956..a4d0939 100644

--- a/mama/dotnet/src/examples/MamaSubscriber/MamaSubscriberCS.cs

+++ b/mama/dotnet/src/examples/MamaSubscriber/MamaSubscriberCS.cs

@@ -200,6 +200,7 @@ namespace Wombat

                     Console.WriteLine(String.Format("{0,20}",field.getAsString()));

                     break;

             }

+            Console.Out.Flush();

         }

         

         private void displayAllFields(MamaMsg msg)

diff --git a/mama/jni/src/com/wombat/mama/examples/MamaListen.java b/mama/jni/src/com/wombat/mama/examples/MamaListen.java

index c6aeb7a..e3b0c47 100644

--- a/mama/jni/src/com/wombat/mama/examples/MamaListen.java

+++ b/mama/jni/src/com/wombat/mama/examples/MamaListen.java

@@ -555,6 +555,7 @@ public class MamaListen

             System.err.println ("No subjects specified");

             System.exit (1);

         }

+        System.out.flush();

     }

     private static void print (final String what, final int width)

@@ -573,6 +574,7 @@ public class MamaListen

            

             System.out.print (sb.toString());

         }

+        System.out.flush();

     }

     private static void parseCommandLine (final String[] args)

@@ -1070,6 +1072,7 @@ public class MamaListen

                     System.out.println ("Field not found in message.");

                 }

             }

+            System.out.flush();

         }

         private synchronized void displayAllFields(

diff --git a/mama/jni/src/com/wombat/mama/examples/MamaSubscriberJava.java b/mama/jni/src/com/wombat/mama/examples/MamaSubscriberJava.java

index ad5a3c6..96609af 100644

--- a/mama/jni/src/com/wombat/mama/examples/MamaSubscriberJava.java

+++ b/mama/jni/src/com/wombat/mama/examples/MamaSubscriberJava.java

@@ -340,6 +340,7 @@ public class MamaSubscriberJava

             sb.append(" ");

        

         System.out.print(sb.toString());

+        System.out.flush();

     }

    

     private static class SubscriptionCallback

diff --git a/mamda/c_cpp/src/examples/auctionticker.cpp b/mamda/c_cpp/src/examples/auctionticker.cpp

index 3b0aaa9..d6cff60 100644

--- a/mamda/c_cpp/src/examples/auctionticker.cpp

+++ b/mamda/c_cpp/src/examples/auctionticker.cpp

@@ -32,6 +32,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "mama/MamaQueueGroup.h"

#include "dictrequester.h"

@@ -119,6 +120,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/comboticker.cpp b/mamda/c_cpp/src/examples/comboticker.cpp

index d6ded8f..399338c 100644

--- a/mamda/c_cpp/src/examples/comboticker.cpp

+++ b/mamda/c_cpp/src/examples/comboticker.cpp

@@ -37,6 +37,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include <mama/MamaQueueGroup.h>

@@ -351,6 +352,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

        

diff --git a/mamda/c_cpp/src/examples/currencyticker.cpp b/mamda/c_cpp/src/examples/currencyticker.cpp

index 88534d1..8f98682 100644

--- a/mamda/c_cpp/src/examples/currencyticker.cpp

+++ b/mamda/c_cpp/src/examples/currencyticker.cpp

@@ -31,6 +31,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "mama/MamaQueueGroup.h"

#include "dictrequester.h"

@@ -110,6 +111,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/fundamentallisten.cpp b/mamda/c_cpp/src/examples/fundamentallisten.cpp

index a7bb02b..27fb3fe 100644

--- a/mamda/c_cpp/src/examples/fundamentallisten.cpp

+++ b/mamda/c_cpp/src/examples/fundamentallisten.cpp

@@ -29,6 +29,7 @@

#include <iostream>

#include <vector>

#include <stdexcept>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -63,6 +64,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         // Process some command line arguments:

diff --git a/mamda/c_cpp/src/examples/mamdalisten.cpp b/mamda/c_cpp/src/examples/mamdalisten.cpp

index 943e82a..b8b301d 100644

--- a/mamda/c_cpp/src/examples/mamdalisten.cpp

+++ b/mamda/c_cpp/src/examples/mamdalisten.cpp

@@ -27,6 +27,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "mama/MamaQueueGroup.h"

#include "dictrequester.h"

@@ -82,6 +83,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/mamdapublisher.cpp b/mamda/c_cpp/src/examples/mamdapublisher.cpp

index 64f80b5..4e90e6b 100644

--- a/mamda/c_cpp/src/examples/mamdapublisher.cpp

+++ b/mamda/c_cpp/src/examples/mamdapublisher.cpp

@@ -162,6 +162,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         MamdaPublisher* mMamdaPublisher = new MamdaPublisher;

diff --git a/mamda/c_cpp/src/examples/multipartticker.cpp b/mamda/c_cpp/src/examples/multipartticker.cpp

index 3086feb..5be33e1 100644

--- a/mamda/c_cpp/src/examples/multipartticker.cpp

+++ b/mamda/c_cpp/src/examples/multipartticker.cpp

@@ -34,6 +34,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -337,6 +338,7 @@ public:

 int main (int argc, const char* argv[])

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/multisecurityticker.cpp b/mamda/c_cpp/src/examples/multisecurityticker.cpp

index 0a0fd46..d8f6068 100644

--- a/mamda/c_cpp/src/examples/multisecurityticker.cpp

+++ b/mamda/c_cpp/src/examples/multisecurityticker.cpp

@@ -34,6 +34,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -317,6 +318,7 @@ public:

 int main (int argc, const char* argv[])

{

+    setbuf (stdout, NULL);

     try

     {

         // Process some command line arguments:

diff --git a/mamda/c_cpp/src/examples/news/newsticker.cpp b/mamda/c_cpp/src/examples/news/newsticker.cpp

index 3d3ae42..85fd097 100644

--- a/mamda/c_cpp/src/examples/news/newsticker.cpp

+++ b/mamda/c_cpp/src/examples/news/newsticker.cpp

@@ -28,6 +28,7 @@

#include <stdexcept>

#include <iostream>

#include <vector>

+#include <stdio.h>

#include <mama/MamaQueueGroup.h>

#include <mama/MamaSource.h>

#include "../parsecmd.h"

@@ -244,6 +245,7 @@ int main (int argc, const char **argv)

         NewsTicker*         aTicker        = new NewsTicker;

         mamaBridge          bridge         = NULL;

+        setbuf (stdout, NULL);

         CommonCommandLineParser     cmdLine (argc, argv);

        

         bridge = cmdLine.getBridge();

diff --git a/mamda/c_cpp/src/examples/optionchainer.cpp b/mamda/c_cpp/src/examples/optionchainer.cpp

index 1fbf3ad..9afca04 100644

--- a/mamda/c_cpp/src/examples/optionchainer.cpp

+++ b/mamda/c_cpp/src/examples/optionchainer.cpp

@@ -51,6 +51,7 @@

#include <stdexcept>

#include <iostream>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -569,6 +570,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/optionview.cpp b/mamda/c_cpp/src/examples/optionview.cpp

index 7bf7085..3295f6f 100644

--- a/mamda/c_cpp/src/examples/optionview.cpp

+++ b/mamda/c_cpp/src/examples/optionview.cpp

@@ -56,6 +56,7 @@

#include <stdexcept>

#include <iostream>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -553,6 +554,7 @@ private:

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     try

     {

         // Process some command line arguments:

diff --git a/mamda/c_cpp/src/examples/orderbooks/atomicbookbuilder.cpp b/mamda/c_cpp/src/examples/orderbooks/atomicbookbuilder.cpp

index af39747..75b6cbb 100644

--- a/mamda/c_cpp/src/examples/orderbooks/atomicbookbuilder.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/atomicbookbuilder.cpp

@@ -39,6 +39,7 @@

#include <vector>

#include <stdexcept>

#include <iomanip>

+#include <stdio.h>

 #include <mamda/MamdaOrderBook.h>

#include <mamda/MamdaOrderBookPriceLevel.h>

@@ -854,6 +855,7 @@ int main (int argc, const char** argv)

{

     MamaQueueGroup*             queues = NULL;

     mamaBridge                  bridge = NULL;

+    setbuf (stdout, NULL);

     try

     {

         // Initialize the MAMA API

diff --git a/mamda/c_cpp/src/examples/orderbooks/atomicbookticker.cpp b/mamda/c_cpp/src/examples/orderbooks/atomicbookticker.cpp

index 1aac0ab..287712d 100644

--- a/mamda/c_cpp/src/examples/orderbooks/atomicbookticker.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/atomicbookticker.cpp

@@ -39,7 +39,7 @@

#include <vector>

#include <stdexcept>

#include <iomanip>

-

+#include <stdio.h>

 using  std::endl;

using  std::vector;

@@ -226,6 +226,7 @@ int main (int argc, const char** argv)

{

     MamaQueueGroup*             queues = NULL;

     mamaBridge                  bridge = NULL;

+    setbuf (stdout, NULL);

     try

     {

         // Initialize the MAMA API

diff --git a/mamda/c_cpp/src/examples/orderbooks/bookchurn.cpp b/mamda/c_cpp/src/examples/orderbooks/bookchurn.cpp

index c4b0013..a8aa5ad 100644

--- a/mamda/c_cpp/src/examples/orderbooks/bookchurn.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/bookchurn.cpp

@@ -35,6 +35,7 @@

#include "../dictrequester.h"

#include <list>

#include <fstream>

+#include <stdio.h>

 using std::exception;

using std::endl;

@@ -257,6 +258,7 @@ class StatsTimerCallback : public MamaTimerCallback

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/orderbooks/bookpublisher.cpp b/mamda/c_cpp/src/examples/orderbooks/bookpublisher.cpp

index 4bf1757..5528eb7 100644

--- a/mamda/c_cpp/src/examples/orderbooks/bookpublisher.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/bookpublisher.cpp

@@ -255,6 +255,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         BookPublisher* mBookPublisher = new BookPublisher;

diff --git a/mamda/c_cpp/src/examples/orderbooks/bookticker.cpp b/mamda/c_cpp/src/examples/orderbooks/bookticker.cpp

index 17150ba..a25ccc5 100644

--- a/mamda/c_cpp/src/examples/orderbooks/bookticker.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/bookticker.cpp

@@ -479,6 +479,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser  cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/orderbooks/bookviewer.cpp b/mamda/c_cpp/src/examples/orderbooks/bookviewer.cpp

index 95c3888..d3bcc95 100644

--- a/mamda/c_cpp/src/examples/orderbooks/bookviewer.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/bookviewer.cpp

@@ -35,6 +35,7 @@

#include <vector>

#include <stdexcept>

#include <ncurses.h>

+#include <stdio.h>

 #include <signal.h>

#include <unistd.h>

@@ -135,6 +136,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/orderbooks/listenerBookPublisher.cpp b/mamda/c_cpp/src/examples/orderbooks/listenerBookPublisher.cpp

index 919db57..b0602d4 100644

--- a/mamda/c_cpp/src/examples/orderbooks/listenerBookPublisher.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/listenerBookPublisher.cpp

@@ -269,6 +269,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         BookPublisher* mBookPublisher = new BookPublisher;

diff --git a/mamda/c_cpp/src/examples/orderbooks/test/bookiters.cpp b/mamda/c_cpp/src/examples/orderbooks/test/bookiters.cpp

index 27590db..e955af3 100644

--- a/mamda/c_cpp/src/examples/orderbooks/test/bookiters.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/test/bookiters.cpp

@@ -22,6 +22,7 @@

#include <mamda/MamdaOrderBook.h>

#include <mamda/MamdaOrderBookEntry.h>

#include <assert.h>

+#include <stdio.h>

 using namespace Wombat;

@@ -33,6 +34,7 @@ int main (int argc, const char** argv)

{

     MamaDateTime now;

     MamdaOrderBook  book;

+    setbuf (stdout, NULL);

     book.setSymbol (symbol);

     now.setToNow();

diff --git a/mamda/c_cpp/src/examples/orderbooks/test/bookselftest.cpp b/mamda/c_cpp/src/examples/orderbooks/test/bookselftest.cpp

index 55ab0da..65b7d4c 100644

--- a/mamda/c_cpp/src/examples/orderbooks/test/bookselftest.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/test/bookselftest.cpp

@@ -37,6 +37,7 @@

#include <iostream>

#include <vector>

#include <stdexcept>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

@@ -99,6 +100,7 @@ public:

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/orderbooks/test/randomaccess.cpp b/mamda/c_cpp/src/examples/orderbooks/test/randomaccess.cpp

index e706cbe..8d976df 100644

--- a/mamda/c_cpp/src/examples/orderbooks/test/randomaccess.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/test/randomaccess.cpp

@@ -18,7 +18,7 @@

  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA

  * 02110-1301 USA

  */

-

+#include <stdio.h>

#include <mamda/MamdaOrderBook.h>

using namespace Wombat;

@@ -29,6 +29,7 @@ const char* symbol = "MSFT";

int main (int argc, const char** argv)

{

     MamdaOrderBook  book;

+    setbuf (stdout, NULL);

     book.setSymbol (symbol);

     // Populate an order book with N price levels ranging from 50.00

diff --git a/mamda/c_cpp/src/examples/orderimbalanceticker.cpp b/mamda/c_cpp/src/examples/orderimbalanceticker.cpp

index 5c7b206..ee37a9d 100644

--- a/mamda/c_cpp/src/examples/orderimbalanceticker.cpp

+++ b/mamda/c_cpp/src/examples/orderimbalanceticker.cpp

@@ -33,6 +33,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "mama/MamaQueueGroup.h"

#include "dictrequester.h"

@@ -128,6 +129,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/quoteticker.cpp b/mamda/c_cpp/src/examples/quoteticker.cpp

index 5cd4b5a..bc119fd 100644

--- a/mamda/c_cpp/src/examples/quoteticker.cpp

+++ b/mamda/c_cpp/src/examples/quoteticker.cpp

@@ -30,6 +30,7 @@

#include <stdexcept>

#include <iostream>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -170,6 +171,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/secstatuslisten.cpp b/mamda/c_cpp/src/examples/secstatuslisten.cpp

index bb31e62..ed0c187 100644

--- a/mamda/c_cpp/src/examples/secstatuslisten.cpp

+++ b/mamda/c_cpp/src/examples/secstatuslisten.cpp

@@ -28,6 +28,7 @@

#include <iostream>

#include <vector>

#include <stdexcept>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -75,6 +76,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         // Process some command line arguments:

diff --git a/mamda/c_cpp/src/examples/tradeticker.cpp b/mamda/c_cpp/src/examples/tradeticker.cpp

index 21da990..0fa00d0 100644

--- a/mamda/c_cpp/src/examples/tradeticker.cpp

+++ b/mamda/c_cpp/src/examples/tradeticker.cpp

@@ -30,6 +30,7 @@

#include <iostream>

#include <vector>

#include <stdexcept>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -202,6 +203,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/dotnet/src/examples/MamdaBookTicker/MamdaBookTicker.cs b/mamda/dotnet/src/examples/MamdaBookTicker/MamdaBookTicker.cs

index b60e2cb..00dfb02 100644

--- a/mamda/dotnet/src/examples/MamdaBookTicker/MamdaBookTicker.cs

+++ b/mamda/dotnet/src/examples/MamdaBookTicker/MamdaBookTicker.cs

@@ -299,6 +299,7 @@ namespace Wombat.Mamda.Examples

                                                               {

                                                                               Console.WriteLine("");

                                                               }

+                Console.Out.Flush();

                                               }

                                                public void prettyPrintEntries(MamdaOrderBook book)

@@ -345,6 +346,7 @@ namespace Wombat.Mamda.Examples

                                                                                               }

                                                                               }

                                                               }

+                Console.Out.Flush();

                                               }

                                                private void paddedPrint(object val, int padLen, bool padAfter)

@@ -388,6 +390,7 @@ namespace Wombat.Mamda.Examples

                                                                                               Console.Write (val);

                                                                               }

                                                               }

+                Console.Out.Flush();

                                               }

                               }

diff --git a/mamda/dotnet/src/examples/MamdaExamplesCommon/CommandLineProcessor.cs b/mamda/dotnet/src/examples/MamdaExamplesCommon/CommandLineProcessor.cs

index f426101..95e7ff0 100644

--- a/mamda/dotnet/src/examples/MamdaExamplesCommon/CommandLineProcessor.cs

+++ b/mamda/dotnet/src/examples/MamdaExamplesCommon/CommandLineProcessor.cs

@@ -305,6 +305,7 @@ namespace Wombat.Mamda.Examples

                                                               Console.Error.WriteLine(e.ToString());

                                                               Environment.Exit(0);

                                               }

+            Console.Out.Flush();

                               }

                                private string                                                     mSource         = "WOMBAT";

diff --git a/mamda/dotnet/src/examples/MamdaOptionChainExample/MamdaOptionChainExample.cs b/mamda/dotnet/src/examples/MamdaOptionChainExample/MamdaOptionChainExample.cs

index b26a6ae..6ec799a 100644

--- a/mamda/dotnet/src/examples/MamdaOptionChainExample/MamdaOptionChainExample.cs

+++ b/mamda/dotnet/src/examples/MamdaOptionChainExample/MamdaOptionChainExample.cs

@@ -279,6 +279,7 @@ namespace Wombat.Mamda.Examples

                                                                               Console.WriteLine();

                                                                               ++i;

                                                               }

+                Console.Out.Flush();

                                               }

                                                public void printContract(MamdaOptionContract  contract)

@@ -300,6 +301,7 @@ namespace Wombat.Mamda.Examples

                                                                               symbol + " " + exchange + ")  | " +

                                                                               lastPrice + " | " + bidPrice + " | " +

                                                                               askPrice + " | " + accVolume);

+                Console.Out.Flush();

                                               }

                                                public void printlnContract(MamdaOptionContract  contract)

diff --git a/mamda/java/com/wombat/mamda/examples/CommandLineProcessor.java b/mamda/java/com/wombat/mamda/examples/CommandLineProcessor.java

index 9a559bf..048b7ee 100644

--- a/mamda/java/com/wombat/mamda/examples/CommandLineProcessor.java

+++ b/mamda/java/com/wombat/mamda/examples/CommandLineProcessor.java

@@ -370,5 +370,6 @@ class CommandLineProcessor

             e.printStackTrace();

                 System.exit (0);

         }

+        System.out.flush();

     }

}

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookBuilder.java b/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookBuilder.java

index d62ab29..812e477 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookBuilder.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookBuilder.java

@@ -425,6 +425,7 @@ public class MamdaAtomicBookBuilder

                 mEntry      = null;

                 mPriceLevel = null;

             }

+            System.out.flush();

         }

         public AtomicBookBuilder(

@@ -884,6 +885,7 @@ public class MamdaAtomicBookBuilder

             if (mQuietModeLevel<1)

                 System.out.println ("");

+            System.out.flush();

         }

         /*

@@ -984,6 +986,7 @@ public class MamdaAtomicBookBuilder

                     System.out.println ("");

                 }

             }

+            System.out.flush();

         }

 

@@ -1030,6 +1033,7 @@ public class MamdaAtomicBookBuilder

                     System.out.print (val);

                 }

             }

+            System.out.flush();

         }

     }

}

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookTicker.java b/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookTicker.java

index 95ff821..6b8c551 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookTicker.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookTicker.java

@@ -280,6 +280,7 @@ public class MamdaAtomicBookTicker

                 }

                 System.out.print ("\n");

             }

+            System.out.flush();

         }

    

         public void onBookAtomicLevelEntryRecap (

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaBookTicker.java b/mamda/java/com/wombat/mamda/examples/MamdaBookTicker.java

index a8a27d5..13a27c4 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaBookTicker.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaBookTicker.java

@@ -252,6 +252,7 @@ public class MamdaBookTicker

                 prettyPrint (delta);

             }

             prettyPrint (book);

+            System.out.flush();

         }

         public void onBookComplexDelta (MamdaSubscription          subscription,

@@ -319,6 +320,7 @@ public class MamdaBookTicker

                 System.out.print ("RECAP!!!  (seq# " + seqNum + ")\n");

             }

             prettyPrint (book);

+            System.out.flush();

         }

 

@@ -395,6 +397,7 @@ public class MamdaBookTicker

                 System.out.print (action);

                 System.out.print ("  \n");

             }

+            System.out.flush();

         }

         public void prettyPrintLevels (final MamdaOrderBook  book)

@@ -530,6 +533,7 @@ public class MamdaBookTicker

                

             if (mQuietModeLevel<1)

                 System.out.println ("");

+            System.out.flush();

         }

         public void prettyPrintEntries (final MamdaOrderBook book)

@@ -625,6 +629,7 @@ public class MamdaBookTicker

                     System.out.println ("");

                 }

             }

+            System.out.flush();

         }

         private static final String [] sPadding = new String[128];

@@ -668,6 +673,7 @@ public class MamdaBookTicker

                     System.out.print (val);

                 }

             }

+            System.out.flush();

         }

     }

}

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaListen.java b/mamda/java/com/wombat/mamda/examples/MamdaListen.java

index b79efdd..2463bb0 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaListen.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaListen.java

@@ -249,6 +249,7 @@ public class MamdaListen

             }

             System.out.print ("|");

             System.out.print (field.toString()+" \n");

+            System.out.flush();

         }

         public void  setDictionary (

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaOptionChainExample.java b/mamda/java/com/wombat/mamda/examples/MamdaOptionChainExample.java

index 64683d4..6b17439 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaOptionChainExample.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaOptionChainExample.java

@@ -336,6 +336,7 @@ public class MamdaOptionChainExample

                 System.out.println ();

                 ++i;

             }

+            System.out.flush();

         }

         public void printContract (MamdaOptionContract  contract)

@@ -369,6 +370,7 @@ public class MamdaOptionChainExample

                                   lastPrice + " | "   + bidPrice    + " | "   +

                                   askPrice  + " | "   + accVolume);

             }

+            System.out.flush();

         }

         public void printlnContract (MamdaOptionContract  contract)

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaOrderImbalanceTicker.java b/mamda/java/com/wombat/mamda/examples/MamdaOrderImbalanceTicker.java

index 28f8fc4..cc0946e 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaOrderImbalanceTicker.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaOrderImbalanceTicker.java

@@ -240,5 +240,6 @@ public class MamdaOrderImbalanceTicker

         {

             System.out.println ("Error (" + subscription.getSymbol() + ")");

         }

+        System.out.flush();

     }

}

--

1.7.1

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.

Join Openmama-dev@lists.openmama.org to automatically receive all group messages.