Date   

Re: FYI erroneous log messages

Mike Schonberg <mschonberg@...>
 

William,

 

Thanks for pointing that out. I just submitted a patch that fixes that and cleans up some of the coding style in that file as well.

 

Regards,

-Mike

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of William Henry
Sent: Thursday, May 10, 2012 5:01 PM
To: openmama-dev@...
Subject: [Openmama-dev] FYI erroneous log messages

 

Hi,

Got some time today to look through the avis bridge code to try and understand the flow more.

Not a biggie: I found that avisBridgeMamaTransport_destroy() logs two avisBridgeMamaTransport_create traces.

William


Please consider the environment before printing this email.

Visit our website at http://www.nyse.com
*****************************************************************************
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


Re: OpenMAMA 2.1 - configure: WARNING: unrecognized options: --with-avis

David @ Rai Technology
 


Hi Mark,
You are using the wrong option it should be ./configure --avis-path=<avis source dir>

inside configure this argument gets converted to the  --with-avis required by the other configure scripts

Regards,
David

---snip---x
    case $i in
        --avis-path=*)
            AVIS_HOME=${i#*=}
            WITH_AVIS="--with-avis=${AVIS_HOME}"
            ;;

----snip--x


README out of date to perform build on Linux

David @ Rai Technology
 

Hi Guys,

Just gone through install and build and found a few things out of date in the README.
The main one is the need to run the obviously named generateBuildFiles.sh


building source from git
================

Instructions in README seem to be out of date or need a little more detailed.

1. instal avis client from here:

    http://downloads.sourceforge.net/avis/avis-client-1.2.4.tar.gz

2. avis ./configure, build

3. tweak avis, copy missing header file from correct platform location

   export AVIS_HOME=<where you installed it>
   cp ${AVIS_HOME}/platforms/gnu_automake/avis_client_config.h ${AVIS_HOME}/src/include/avis

4. run script to generate configure scrpts in downstream directories

    ./generateBuildFiles.sh

5. ./configure --prefix=/home/openmama --avis-path=${AVIS_HOME}/src/avis-client-1.2.4/src

6. make, make install


couple of things I haven't fully tracked down yet:

make install in the top dir does not install the mama/examples
when you run make install in the example/c dir it installs in /bin not examples/mama as the mamda and jni examples do

Regards,
David




Re: README out of date to perform build on Linux

Mike Schonberg <mschonberg@...>
 

On Sat, 12 May 2012, David Ashburner wrote:

Hi Guys,

Just gone through install and build and found a few things out of date in
the README.
The main one is the need to run the obviously named generateBuildFiles.sh

building source from git
================

Instructions in README seem to be out of date or need a little more
detailed.

1. instal avis client from here:

http://downloads.sourceforge.net/avis/avis-client-1.2.4.tar.gz
I will update this. It might make sense to point to
http://downloads.sourceforge.net/avis/ so it is less likely to get out of date
with new Avis release.


2. avis ./configure, build

3. tweak avis, copy missing header file from correct platform location

export AVIS_HOME=<where you installed it>
cp ${AVIS_HOME}/platforms/gnu_automake/avis_client_config.h
${AVIS_HOME}/src/include/avis
I will make the appropriate changes as well.

4. run script to generate configure scrpts in downstream directories

./generateBuildFiles.sh
Someone else pointed out the same problem in bugzilla. I am preparing a patch
that updates the readme to inlcude this step for git builds.

Currently the source tarball does not contain the configure scripts. I will
remedy this shortly as well.


5. ./configure --prefix=/home/openmama
--avis-path=${AVIS_HOME}/src/avis-client-1.2.4/src
The next REAME patch will contain this as well.

6. make, make install


couple of things I haven't fully tracked down yet:

make install in the top dir does not install the mama/examples
when you run make install in the example/c dir it installs in /bin not
examples/mama as the mamda and jni examples do
From the top directory, "make install" should install the compiled examples in
<prefix>/bin and the example source in <prefix>/examples/... Are you running
make with more than one job (-j > 2)?

Thanks for the detailed feedback. This is very helpful. The build process is not
nearly as smooth as I would like it. I will incorporate your suggestions in one
more patches

Regards,
-Mike


Regards,
David




Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


OpenMAMA bridge implementation

Pavel Patarinski <pavel.patarinski@...>
 

Hi all,

At Tick42 we are porting various data feed drivers (rather than middleware connectors) to load as OpenMama bridges, I have been making some notes on the various calls into the Bridge API to help me work out what order things are called in.

I have produced the following three documents which show the sequence of calls into the Avis Bridge when running an OpenMama subscriber. I am using these to help work out where to put various chunks of our existing driver code.

Given the work that people are starting to do on producing drivers, we thought it might be useful to share these notes. Please feed back with any comments or corrections.

1. Initialization and startup:
The first document describes order of execution and some basic description of bridge interface functions which are called during OpenMAMA initialization and startup.

2. Making a subscription:
The second document lists bridge interface functions which are used when subscription is created.

3. Decoding the data:
The third document describes how payload message is created and processed by OpenMAMA framework.

Pavel Pararinski
www.tick42.com


Re: OpenMAMA bridge implementation

Les Spiro
 

And here are the PDF's that Pavel meant to attach :)

Not sure if they will be forwarded via the mailing list.

It's an interesting experience for us as we start to port our drivers
(which look more like Reuters SSL) into OpenMama bridges which look more
like Tib RV :)

For example is it interesting to see the way the subscription call looks
like create a subscription message, then code to set various values
followed by a send message (although also interesting to see the cheat in
the Avis driver which just makes the subscribe call on the create
subscription message).

Anyway we will be producing a few of these bridges (announcements when
they are ready for beta testing) and so we are interested in any
feedback/advice.


Les Spiro
http://www.tick42.com
http://twitter.com/intent/user?screen_name=Tick_42


On 16/05/2012 17:02, "Pavel Patarinski" <pavel.patarinski@tick42.com>
wrote:

Hi all,

At Tick42 we are porting various data feed drivers (rather than
middleware connectors) to load as OpenMama bridges, I have been making
some notes on the various calls into the Bridge API to help me work out
what order things are called in.

I have produced the following three documents which show the sequence of
calls into the Avis Bridge when running an OpenMama subscriber. I am
using these to help work out where to put various chunks of our existing
driver code.

Given the work that people are starting to do on producing drivers, we
thought it might be useful to share these notes. Please feed back with
any comments or corrections.

1. Initialization and startup:
The first document describes order of execution and some basic
description of bridge interface functions which are called during
OpenMAMA initialization and startup.

2. Making a subscription:
The second document lists bridge interface functions which are used
when subscription is created.

3. Decoding the data:
The third document describes how payload message is created and
processed by OpenMAMA framework.

Pavel Pararinski
www.tick42.com


[PATCH] [README] Updated Build Instructions

Michael Schonberg <mschonberg@...>
 

From: Mike Schonberg <mschonberg@nyx.com>

Added better download and build instructions for the Avis client and router.

For the OpenMAMA build it is necessary to specify --with-avis to build the Avis
bridge, and it is also necessary to invoke generateBuildFiles.sh prior to
building source from a cloned git repository.

Signed-off-by: Mike Schonberg <mschonberg@nyx.com>
---
README | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/README b/README
index 855bb3a..0132ec4 100644
--- a/README
+++ b/README
@@ -56,7 +56,7 @@ To use OpenMAMA you will need a middleware/payload. An example middleware bridge
and payload is included for Avis. Avis can be obtained from the following
website:

-http://avis.sourceforge.net.
+ http://avis.sourceforge.net.

OpenMAMA API reference documentation depends on:

@@ -267,11 +267,22 @@ Currently OpenMAMA assumes Avis is the middleware to be built with, as this is
currently the only opensource middleware supported. Therefore, the Avis client
libraries must be available.

+The Avis router (avisd) is avalaible from:
+ http://sourceforge.net/projects/avis/viles/Avis%20router/
+
+To build the avis client:
+ download the source from:
+ http://downloads.sourceforge.net/avis/avis-client-1.2.4.tar.gz
+ tar -xzf avis-client-1.2.4.tar.gz
+ cd avis-client-1.2.4
+ ./configure --prefix=${AVIS_HOME}
+ make install
+
The default install of Avis is missing a header file. This needs to be moved
manually in the include directory. The OpenMAMA configure script checks for
this header and will exit with an error if not found.

- mv ${AVIS_SOURCE}/lib/avis_client_config.h ${AVIS_HOME}/include/avis
+ mv ${AVIS_SOURCE}/platforms/gnu_automake/avis_client_config.h ${AVIS_HOME}/include/avis



@@ -291,7 +302,15 @@ The following uses the default settings to build the OpenMAMA library and
example applications. This assumes that Avis middleware is available in
/usr/local, and will install OpenMAMA to /opt/OpenMAMA

- ./configure
+If you are building source code cloned from the OpenMAMA git repository run the
+following command before following the remaining instructions:
+
+ ./generateBuildFiles.sh
+
+For source downloaded as an archive from http://www.openmama.org, it is not
+necessary to run generateBuildFiles.sh.
+
+ ./configure --with-avis=/usr/local
make
sudo make install

--
1.7.7.6


Upcoming Patches

Ian Bell <IBell@...>
 

Hi

 

The following patches are a result of ongoing maintenance of the commercial version of MAMA. 

 

Patches will be submitted every 2-3 weeks to this list for review and application to OpenMAMA.  As this is the first set there are a few more than will usually be the case.

 

Ian Bell

Senior Software Engineer

NYSE Technologies
IBell@...




Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


[PATCH] [MAMDA] JDK-1.7

Ian Bell <IBell@...>
 

commit 0747f4e1576b405113af509368b50f3dd2e2f0d8

Author: Ian Bell <IBell@...>

Date:   Thu May 17 21:49:45 2012 +0100

 

    [mamda] Fixed build for Java 1.7

    Signed-off-by: Ian Bell <IBell@...>

 

diff --git a/mamda/java/build.xml b/mamda/java/build.xml

index 395fad4..7300e68 100644

--- a/mamda/java/build.xml

+++ b/mamda/java/build.xml

@@ -11,6 +11,7 @@

      <echo message="ant.java.version=${ant.java.version}"></echo>

      <condition property="isJava5or6">

      <or>

+     <equals arg1="${ant.java.version}" arg2="1.7"></equals>

      <equals arg1="${ant.java.version}" arg2="1.6"></equals>

      <equals arg1="${ant.java.version}" arg2="1.5"></equals>

      </or>



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


[PATCH] [mamda] Fixed an issue where the delta list was not cleared on a book clear

Ian Bell <IBell@...>
 

commit 68b1fc12fde4b6edde78cb3a0fde6b542f8b9053

Author: Ian Bell <IBell@...>

Date:   Thu May 17 21:52:02 2012 +0100

 

    [mamda] Fixed an issue where the delta list was not cleared on a book clear

    Signed-off-by: Ian Bell <IBell@...>

 

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

index 440db8f..0c71c30 100644

--- a/mamda/c_cpp/src/cpp/orderbooks/MamdaOrderBook.cpp

+++ b/mamda/c_cpp/src/cpp/orderbooks/MamdaOrderBook.cpp

@@ -428,6 +428,11 @@ namespace Wombat

         mImpl.mNeedsReevaluation = false;

         // do not reset mImpl.mCheckVisibility

+

+        if (mImpl.mGenerateDeltas)

+        {

+            clearDeltaList();

+        }

     }

     void MamdaOrderBook::setSymbol (const char*  symbol)



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


[PATCH] [mamda] map a delete msg through mamda as an error callback

Ian Bell <IBell@...>
 

commit be5ec93af947d5ed9458bf8a5e05b7300a9322d6

Author: Ian Bell <IBell@...>

Date:   Thu May 17 21:47:41 2012 +0100

 

    [mamda] map a delete msg through mamda as an error callback

    Signed-off-by: Ian Bell <IBell@...>

 

diff --git a/mama/c_cpp/src/c/mama/status.h b/mama/c_cpp/src/c/mama/status.h

index 1c48c00..ab51f63 100644

--- a/mama/c_cpp/src/c/mama/status.h

+++ b/mama/c_cpp/src/c/mama/status.h

@@ -94,6 +94,8 @@ typedef enum

     MAMA_STATUS_INVALID_QUEUE               = 27,

      /* Not modifiable  */

     MAMA_STATUS_NOT_MODIFIABLE              = 28,

+     /* Message Type DELETE  */

+    MAMA_STATUS_DELETE                      = 29,

               /* Not permissioned for the subject */

     MAMA_STATUS_NOT_PERMISSIONED                                            = 4001,

     /* Subscription is in an invalid state. */

diff --git a/mama/c_cpp/src/c/status.c b/mama/c_cpp/src/c/status.c

index e8c1c31..f5cb3ff 100644

--- a/mama/c_cpp/src/c/status.c

+++ b/mama/c_cpp/src/c/status.c

@@ -57,6 +57,7 @@ mamaStatus_stringForStatus (mama_status status)

     case MAMA_STATUS_NOT_INSTALLED : return "NOT_INSTALLED";

     case MAMA_STATUS_NO_BRIDGE_IMPL : return "NO_BRIDGE_IMPL";

     case MAMA_STATUS_INVALID_QUEUE : return "INVALID_QUEUE";

+    case MAMA_STATUS_DELETE : return "STATUS_DELETE";

     case MAMA_STATUS_NOT_MODIFIABLE : return "NOT_MODIFIABLE";

               case MAMA_STATUS_NOT_PERMISSIONED : return "MAMA_STATUS_NOT_PERMISSIONED";       

     case MAMA_STATUS_SUBSCRIPTION_INVALID_STATE: return "MAMA_STATUS_SUBSCRIPTION_INVALID_STATE";

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

index 52060d9..65da8d9 100644

--- a/mama/jni/src/com/wombat/mama/MamaMsgStatus.java

+++ b/mama/jni/src/com/wombat/mama/MamaMsgStatus.java

@@ -81,6 +81,10 @@ public class MamaMsgStatus

     /** Message with duplicate sequence number */

     public static final short STATUS_DUPLICATE = 15;

+    /** Message with the type of DELETE */

+    public static final short STATUS_DELETE = 17;

+

+

     public static final short STATUS_EXCEPTION = 999;

     /**

diff --git a/mamda/c_cpp/src/cpp/MamdaSubscription.cpp b/mamda/c_cpp/src/cpp/MamdaSubscription.cpp

index 9b6599c..d9a9d30 100644

--- a/mamda/c_cpp/src/cpp/MamdaSubscription.cpp

+++ b/mamda/c_cpp/src/cpp/MamdaSubscription.cpp

@@ -471,6 +471,21 @@ namespace Wombat

         switch (msgType)

         {

             case MAMA_MSG_TYPE_DELETE:

+                if (subscription->checkDebugLevel (MAMA_LOG_LEVEL_FINE))

+                {

+                    const char *contentSymbol = "N/A";

+                    msg.tryString (MamdaCommonFields::ISSUE_SYMBOL, contentSymbol);

+

+                    mama_forceLog (MAMA_LOG_LEVEL_FINE,

+                                   "MamdaSubscription (%s.%s(%s)) "

+                                   "ignoring msg. type: %s\n",

+                                   mSource->getPublisherSourceName(),

+                                   mSymbol.c_str (),

+                                   contentSymbol,

+                                   msg.getMsgTypeName());

+                }

+                             onError (subscription, MAMA_STATUS_DELETE , "Msg Type Delete");

+                return;

             case MAMA_MSG_TYPE_EXPIRE:

                 if (subscription->checkDebugLevel (MAMA_LOG_LEVEL_FINE))

                 {

@@ -566,6 +581,11 @@ namespace Wombat

                 code     = MAMDA_ERROR_BAD_SYMBOL;

                 errStr   = "bad symbol";

                 break;

+            case MAMA_STATUS_DELETE:

+                severity = MAMDA_SEVERITY_OK;

+                code     = MAMDA_ERROR_DELETE;

+                errStr   = "message type delete";

+                break;

             case MAMA_STATUS_TIMEOUT:

                 severity = MAMDA_SEVERITY_HIGH;

                 code     = MAMDA_ERROR_TIME_OUT;

diff --git a/mamda/c_cpp/src/cpp/mamda/MamdaErrorListener.h b/mamda/c_cpp/src/cpp/mamda/MamdaErrorListener.h

index d93877f..5168987 100644

--- a/mamda/c_cpp/src/cpp/mamda/MamdaErrorListener.h

+++ b/mamda/c_cpp/src/cpp/mamda/MamdaErrorListener.h

@@ -57,7 +57,7 @@ namespace Wombat

         MAMDA_ERROR_TIME_OUT,

         MAMDA_ERROR_ENTITLEMENT,

         MAMDA_ERROR_NOT_FOUND,

-        MAMDA_ERROR_WATCH_THIS_SPACE

+        MAMDA_ERROR_DELETE

     };

     /**

diff --git a/mamda/java/com/wombat/mamda/MamdaErrorCode.java b/mamda/java/com/wombat/mamda/MamdaErrorCode.java

index fa25213..59de128 100644

--- a/mamda/java/com/wombat/mamda/MamdaErrorCode.java

+++ b/mamda/java/com/wombat/mamda/MamdaErrorCode.java

@@ -72,6 +72,9 @@ public class MamdaErrorCode

     /** Bandwidth exceeded */

     public static final short MAMDA_ERROR_BANDWIDTH_EXCEEDED = 14;

+    /** Message of type DELETE */

+    public static final short MAMDA_ERROR_DELETE = 17;

+

     public static final short MAMDA_ERROR_EXCEPTION = 999;

 

@@ -100,6 +103,7 @@ public class MamdaErrorCode

         case MAMDA_ERROR_TOPIC_CHANGE:       return "TOPIC_CHANGE";

         case MAMDA_ERROR_BANDWIDTH_EXCEEDED: return "BANDWIDTH_EXCEEDED";

         case MAMDA_ERROR_EXCEPTION:          return "EXCEPTION PROCESSING MESSAGE";

+        case MAMDA_ERROR_DELETE:          return "MESSAGE TYPE DELETE";

         default: return "UNKNOWN";

         }

     }

@@ -124,6 +128,7 @@ public class MamdaErrorCode

         case MamaMsgStatus.STATUS_TOPIC_CHANGE:         return MAMDA_ERROR_TOPIC_CHANGE;

         case MamaMsgStatus.STATUS_BANDWIDTH_EXCEEDED:   return MAMDA_ERROR_BANDWIDTH_EXCEEDED;

         case MamaMsgStatus.STATUS_EXCEPTION:            return MAMDA_ERROR_EXCEPTION;

+        case MamaMsgStatus.STATUS_DELETE:               return MAMDA_ERROR_DELETE;

         }

         return -1;

diff --git a/mamda/java/com/wombat/mamda/MamdaSubscription.java b/mamda/java/com/wombat/mamda/MamdaSubscription.java

index 3d82225..46efd13 100644

--- a/mamda/java/com/wombat/mamda/MamdaSubscription.java

+++ b/mamda/java/com/wombat/mamda/MamdaSubscription.java

@@ -470,10 +470,15 @@ public class MamdaSubscription

             short msgType   = MamaMsgType.typeForMsg     (msg);

             int   msgStatus = MamaMsgStatus.statusForMsg (msg);

             mLatestMsg      = msg;

+            short mywombatStatus  = 17;

+            int myplatformError  = 0;

+            Exception  myException     = new Exception();

             switch (msgType)

             {

                 case MamaMsgType.TYPE_DELETE:

+                    onError (subscription, mywombatStatus, myplatformError, "Message Type Delete", myException);

+                    return;

                 case MamaMsgType.TYPE_EXPIRE:

                     subscription.destroy();

                     mLatestMsg = null;



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


[PATCH][mama] Added a heartbeat tick API for building FT recovery functionality

Ian Bell <IBell@...>
 

commit f9f47ce5c1a28f52470b056c852722bd85dadde9

Author: Ian Bell <IBell@...>

Date:   Thu May 17 21:43:16 2012 +0100

 

    [mama] Added a heartbeat tick API for building FT recovery functionality

    Signed-off-by: Ian Bell <IBell@...>

 

diff --git a/mama/c_cpp/src/c/ft.c b/mama/c_cpp/src/c/ft.c

index a6b886c..b7366d3 100644

--- a/mama/c_cpp/src/c/ft.c

+++ b/mama/c_cpp/src/c/ft.c

@@ -142,6 +142,7 @@ typedef struct mamaFtMemberImpl_

     mamaPublisher                  myPublisher;

     mamaTimer                      myHeartbeatTimer;

     mamaTimer                      myTimeoutTimer;

+    mama_u32_t                     myHeartbeatTick;

     mamaMsg                        myHeartbeatMsg;

     const char*                    myInstanceId;

     const char*                    mySymbol;

@@ -298,6 +299,7 @@ mamaFtMember_activate (

     mama_getIpAddress(&ipaddress);

     impl->myIP=inet_addr(ipaddress);

     impl->myNextIncarnation = 1;

+    impl->myHeartbeatTick = 0;

     /* Set up the heartbeat timeout timer. */

     status = startTimeoutTimer (impl);

@@ -408,6 +410,18 @@ mamaFtMember_getTimeoutInterval (

}

 mama_status

+mamaFtMember_getHeartbeatTick (

+    const mamaFtMember  member,

+    mama_u32_t*         result)

+{

+    mamaFtMemberImpl* impl = (mamaFtMemberImpl*) member;

+    if (!impl || !result)

+        return MAMA_STATUS_INVALID_ARG;

+    *result = impl->myHeartbeatTick;

+    return MAMA_STATUS_OK;

+}

+

+mama_status

mamaFtMember_getClosure (

     const mamaFtMember  member,

     void**              result)

@@ -611,6 +625,7 @@ ftHeartbeatTimerCb (mamaTimer          timer,

{

     mamaFtMemberImpl* impl = (mamaFtMemberImpl*)closure;

     mama_log (MAMA_LOG_LEVEL_FINE, "MAMA multicast FT: heartbeat timer has fired");

+    impl->myHeartbeatTick++;

     impl->ftSendHeartbeat (impl);

}

@@ -833,6 +848,7 @@ multicastFt_setup (

         if (ftInterface == NULL)

             ftInterface = "";

     }

+   

     ftNetwork = multicastFt_getProperty (propertyName,

             "mama.multicast.transport.%s.network", transportName);

     if (ftNetwork == NULL)

diff --git a/mama/c_cpp/src/c/mama/ft.h b/mama/c_cpp/src/c/mama/ft.h

index 2a96db4..b5279d3 100644

--- a/mama/c_cpp/src/c/mama/ft.h

+++ b/mama/c_cpp/src/c/mama/ft.h

@@ -156,6 +156,15 @@ mamaFtMember_getTimeoutInterval (

     mama_f64_t*         result);

 /**

+ * Get the current heartbeat tick of the MAMA FT member.

+ */

+MAMAExpDLL

+extern mama_status

+mamaFtMember_getHeartbeatTick (

+    const mamaFtMember  member,

+    mama_u32_t*         result);

+

+/**

  * Get the closure argument (provided in the mamaFtMember_create()

  * function) of the MAMA FT member.

  */



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


[PATCH][mamda] Moved processing of IsIrregular Field to mirror C++ functionality

Ian Bell <IBell@...>
 

commit c8d8dfaa5074343869aada0ea67bd94b55cb806b

Author: Ian Bell <IBell@...>

Date:   Thu May 17 21:51:10 2012 +0100

 

    [mamda] Moved processing of IsIrregular Field to mirror C++ functionality

    Signed-off-by: Ian Bell <IBell@...>

 

diff --git a/mamda/java/com/wombat/mamda/MamdaTradeListener.java b/mamda/java/com/wombat/mamda/MamdaTradeListener.java

index 0cf66c4..8049981 100644

--- a/mamda/java/com/wombat/mamda/MamdaTradeListener.java

+++ b/mamda/java/com/wombat/mamda/MamdaTradeListener.java

@@ -3776,9 +3776,6 @@ public class MamdaTradeListener implements MamdaMsgListener,

         if (MamdaTradeFields.ON_EXCHANGE_TRADE_PRICE != null)

             mUpdaters[i++] = new  OnExTradePrice();

-        if (MamdaTradeFields.IS_IRREGULAR != null)

-            mUpdaters[i++] = new  TradeIsIrregular();

-

         if (MamdaTradeFields.TRADE_UNITS != null)

             mUpdaters[i++] = new  TradeUnits();

@@ -3874,6 +3871,10 @@ public class MamdaTradeListener implements MamdaMsgListener,

         if (MamdaTradeFields.UPDATE_AS_TRADE != null)

             mUpdaters[i++] = new  TradeUpdateAsTrade();

+

+        if (MamdaTradeFields.IS_IRREGULAR != null)

+            mUpdaters[i++] = new  TradeIsIrregular();

+

     }

}

 



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


[PATCH] [common] Added some other pthread calls to linux os abstraction layer

Ian Bell <IBell@...>
 

commit cd1c6ae95f2d709136b687f4c40d11a446d4990c

Author: Ian Bell <IBell@...>

Date:   Thu May 17 21:38:59 2012 +0100

 

    [common] Added some other pthread calls to linux os abstraction layer

    Signed-off-by: Ian Bell <IBell@...>

 

diff --git a/common/c_cpp/src/c/linux/port.h b/common/c_cpp/src/c/linux/port.h

index b40b4fa..a94ac7f 100644

--- a/common/c_cpp/src/c/linux/port.h

+++ b/common/c_cpp/src/c/linux/port.h

@@ -58,6 +58,7 @@ extern "C"

/* PTHREAD static locks are easy */

typedef pthread_mutex_t wthread_static_mutex_t;

#define WSTATIC_MUTEX_INITIALIZER PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP

+#define WTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE

#define wthread_static_mutex_lock(x) pthread_mutex_lock((x))

#define wthread_static_mutex_unlock(x) pthread_mutex_unlock((x))

@@ -135,6 +136,7 @@ int wsem_timedwait (wsem_t* sem, unsigned int ts);

#define wthread_cond_signal     pthread_cond_signal

#define wthread_cond_destroy    pthread_cond_destroy

#define wthread_cond_wait     pthread_cond_wait

+#define wthread_cond_broadcast        pthread_cond_broadcast

 #define wthread_spinlock_t     pthread_spinlock_t   

 #define wthread_spin_init      pthread_spin_init

@@ -147,6 +149,7 @@ int wsem_timedwait (wsem_t* sem, unsigned int ts);

 #define wthread_mutexattr_t pthread_mutexattr_t

#define wthread_mutexattr_init pthread_mutexattr_init

+#define wthread_mutexattr_destroy pthread_mutexattr_destroy

#define wthread_mutexattr_settype pthread_mutexattr_settype

 #define wGetCurrentThreadId     pthread_self



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


[PATCH] [mama] Added a log file rolling API

Ian Bell <IBell@...>
 

commit 5fa225447238332cc15512e2d065cdff4f15175c

Author: Ian Bell <IBell@...>

Date:   Thu May 17 21:44:26 2012 +0100

 

    [mama] Added a log file rolling API

    Signed-off-by: Ian Bell <IBell@...>

 

diff --git a/mama/c_cpp/src/c/log.c b/mama/c_cpp/src/c/log.c

index d6c99b7..a8ca6cc 100644

--- a/mama/c_cpp/src/c/log.c

+++ b/mama/c_cpp/src/c/log.c

@@ -1000,8 +1000,8 @@ mama_logDefault2 (MamaLogLevel level,

                fprintf (f, "(%x) : ", (unsigned int)wGetCurrentThreadId());

                               }

-                              fprintf (f, message);       

-        fprintf (f, "\n");

+                             fprintf (f, "%s", message);

+        fprintf (f, "%s", "\n");

         fflush (f);

     }

@@ -1222,3 +1222,16 @@ int mama_logDecrementVerbosity(MamaLogLevel* level)

     *level = MAMA_LOG_LEVEL_FINEST;

     return 1;

}

+

+mama_status mama_logForceRollLogFiles()

+{

+    mama_status ret = MAMA_STATUS_INVALID_ARG;

+    MRSW_RESULT          al = mamaLog_acquireLock(0);

+    if(MRSW_S_OK == al)

+             {

+        ret = mamaLog_rollLogFiles();

+                             /* Release the read lock. */

+                             MRSWLock_release(g_lock, 1);

+             }

+    return ret;

+}

diff --git a/mama/c_cpp/src/c/mama/log.h b/mama/c_cpp/src/c/mama/log.h

index 6c7915a..bd96fc7 100644

--- a/mama/c_cpp/src/c/mama/log.h

+++ b/mama/c_cpp/src/c/mama/log.h

@@ -282,6 +282,15 @@ MAMAExpDLL

extern int

mama_logDecrementVerbosity(MamaLogLevel* level);

+/**

+ * Force rolling the log file.

+ *

+ * @return The status of the operation.

+ */

+MAMAExpDLL

+extern mama_status

+mama_logForceRollLogFiles();

+

/**  Destroy memory held by the logging */

void

mama_logDestroy(void);

diff --git a/mama/c_cpp/src/cpp/MamaLogFile.cpp b/mama/c_cpp/src/cpp/MamaLogFile.cpp

index ca77c07..14955a5 100644

--- a/mama/c_cpp/src/cpp/MamaLogFile.cpp

+++ b/mama/c_cpp/src/cpp/MamaLogFile.cpp

@@ -93,4 +93,9 @@ namespace Wombat

         }

     }

+    void MamaLogFile::rollFiles()

+    {

+        mamaTry (mama_logForceRollLogFiles());

+    }

+

} // namespace Wombat

diff --git a/mama/c_cpp/src/cpp/mama/MamaLogFile.h b/mama/c_cpp/src/cpp/mama/MamaLogFile.h

index 4d4abd7..87b023b 100644

--- a/mama/c_cpp/src/cpp/mama/MamaLogFile.h

+++ b/mama/c_cpp/src/cpp/mama/MamaLogFile.h

@@ -88,6 +88,11 @@ namespace Wombat

          */

         static bool loggingToFile( void );

+        /**

+         * Perform a log file rolling.

+         */

+        static void rollFiles();

+

     private:

         /**

          * Utility class. No instances.



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


[PATCH][mama] Added a unittest command line arg to test different payloads

Ian Bell <IBell@...>
 

commit 74cd857ce792cfbd3bcc490d2c5a3350d500d21e

Author: Ian Bell <IBell@...>

Date:   Thu May 17 21:48:53 2012 +0100

 

    [mama] Added a unittest command line arg to test different payloads

    Signed-off-by: Ian Bell <IBell@...>

 

diff --git a/mama/c_cpp/src/gunittest/Makefile.am b/mama/c_cpp/src/gunittest/Makefile.am

index 3a09645..b51c0af 100644

--- a/mama/c_cpp/src/gunittest/Makefile.am

+++ b/mama/c_cpp/src/gunittest/Makefile.am

@@ -24,5 +24,3 @@ VPATH  = @srcdir@

 SUBDIRS = c cpp

-CPPFLAGS += -DWITH_UNIT_TESTS

-CFLAGS += -DWITH_UNIT_TESTS

diff --git a/mama/c_cpp/src/gunittest/c/MainUnitTestC.cpp b/mama/c_cpp/src/gunittest/c/MainUnitTestC.cpp

index 9b0ea7d..9343e86 100644

--- a/mama/c_cpp/src/gunittest/c/MainUnitTestC.cpp

+++ b/mama/c_cpp/src/gunittest/c/MainUnitTestC.cpp

@@ -38,6 +38,7 @@ static string version     ("APPNAMESTR:  Version " VERSIONSTR

 

 static const char*       gMiddleware         = "wmw";

+static const char*       gPayload         = "wmsg";

 

 const char* getMiddleware (void)

@@ -45,6 +46,11 @@ const char* getMiddleware (void)

               return gMiddleware;

}

+const char* getPayload (void)

+{

+             return gPayload;

+}

+

static void parseCommandLine (int argc, char** argv)

{

     int i = 1;

@@ -57,6 +63,11 @@ static void parseCommandLine (int argc, char** argv)

                                               gMiddleware = argv[i+1];

                                               i += 2;

                               }

+                             else if (strcmp ("-p", argv[i]) == 0)

+                             {

+                                             gPayload = argv[i+1];

+                                             i += 2;

+                             }

         else

         {

            //unknown arg

diff --git a/mama/c_cpp/src/gunittest/c/MainUnitTestC.h b/mama/c_cpp/src/gunittest/c/MainUnitTestC.h

index 595521b..947cc90 100644

--- a/mama/c_cpp/src/gunittest/c/MainUnitTestC.h

+++ b/mama/c_cpp/src/gunittest/c/MainUnitTestC.h

@@ -25,4 +25,5 @@

 const char* getMiddleware (void);

+const char* getPayload (void);

#endif /* MAINUNITTESTC_H_ */



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


[PATCH] [mama] Fix some compiler warnings in example applications

Ian Bell <IBell@...>
 

commit 209b2547f7ae959ab9d4fb96fe132c04855cfed3

Author: Ian Bell <IBell@...>

Date:   Fri May 18 11:48:00 2012 +0100

 

    [mama] Fix some compiler warnings in example applications

    Signed-off-by: Ian Bell <IBell@...>

 

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

index 598db0e..9cbbe3c 100644

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

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

@@ -94,7 +94,7 @@ typedef vector<const char*>      SymbolList;

 #define BUFFER_SIZE 256

-static  char* gUsageString[]=

+static const char* gUsageString[]=

{

     "mamalistencpp - Generic Mama API C++ subscriber.",

     "",

@@ -185,7 +185,7 @@ private:

     const char*              mDictTport;

     MamaTransport*           mDictTransport;

     int                      mDumpDataDict;

-    int                                                                                     mBuildDataDict;

+    bool                                                                                mBuildDataDict;

     bool                     mDictionaryComplete;

     int                      mRequireInitial;

     int                      mSnapshot;

@@ -265,16 +265,16 @@ public:

     template <class Vector>

     void displayVectorField       (Vector*            field,

                                    size_t             size,

-                                   char*              format);

+                                   const char*        format);

 

     template <class T>

-    void printData                (char*              format,

+    void printData                (const char*        format,

                                    T                  data);

     /* This is required for VC6 because it chokes on instantiating

      * the template with "unsigned char.

      */

-    void printData               (char*               format,

+    void printData               (const char*         format,

                                   unsigned char       data);

 private:

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

 

 MamaListen::MamaListen():

+    mShutdownTime           (0),

     mBridgeImpl             (NULL),

     mMiddleware             ("wmw"),

     mDefaultQueue           (NULL),

@@ -439,6 +440,7 @@ MamaListen::MamaListen():

     mDictTport              (NULL),

     mDictTransport          (NULL),

     mDumpDataDict           (0),

+             mBuildDataDict                                 (true),

     mDictionaryComplete     (false),

     mRequireInitial         (1),

     mSnapshot               (0),

@@ -459,9 +461,7 @@ MamaListen::MamaListen():

     mPrintMessages          (false),

     mDisplayData            (true),

     mQualityForAll          (true),

-    mNewIterators           (false),

-    mShutdownTime           (0),

-              mBuildDataDict                                 (true)  

+    mNewIterators           (false)

{}

 MamaListen::~MamaListen()

@@ -557,11 +557,6 @@ void MamaListen::parseCommandLine (int argc, const char* argv[])

             mDumpDataDict = 1;

             i++;

         }

-        else if (strcmp (argv[i], "-B") == 0)

-        {

-            mBuildDataDict = false;

-            i++;

-        }

         else if (strcmp (argv[i], "-I") == 0)

         {

             mRequireInitial = 0;

@@ -671,7 +666,7 @@ void MamaListen::parseCommandLine (int argc, const char* argv[])

         {

             const char* logfileName = argv[i+1];

             if (logfileName == NULL || logfileName[0] == '-'

-                || logfileName == "")

+                || strcmp(logfileName, "") == 0)

             {

                 logfileName = "mamalistencpp.log";

                 i++;

@@ -1518,7 +1513,7 @@ void DisplayCallback::displaySpecificFields (const MamaMsg& msg,

}

 template <class T>

-void DisplayCallback::printData (char*        format,

+void DisplayCallback::printData (const char*  format,

                                  T            data)

{

     if (mMamaListen->getQuietness () < 1)

@@ -1530,7 +1525,7 @@ void DisplayCallback::printData (char*        format,

     }

}

-void DisplayCallback::printData (char*           format,

+void DisplayCallback::printData (const char*     format,

                                  unsigned char   data)

{

     if (mMamaListen->getQuietness () < 1)

@@ -1545,7 +1540,7 @@ void DisplayCallback::printData (char*           format,

template <class Vector>

void DisplayCallback::displayVectorField  (Vector*  field,

                                            size_t   size,

-                                           char*    format)

+                                           const char* format)

{

     if(mMamaListen->printVectorFields ())

     {

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

index 98f61bd..851921e 100644

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

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

@@ -921,22 +921,24 @@ void MamaProxy::usage (int exitStatus)

}

 MamaProxy::MamaProxy():

+    mPubManager         (NULL),

+    mPubTransport       (NULL),

+    mPubTport           (NULL),

     mPubBridge          (NULL),

-    mSubBridge          (NULL),

     mPubMiddleware      ("wmw"),

-    mSubMiddleware      ("wmw"),

     mPubDefaultQueue    (NULL),

-    mSubDefaultQueue    (NULL),

-    mPubTport           (NULL),

-    mSubTport           (NULL),

-    mQuietness          (0),

-    mFilename           (NULL),

     mPubSource          ("MAMA_PROXY"),

+    mSubTransport       (NULL),

+    mSubTport           (NULL),

+    mSubBridge          (NULL),

+    mSubMiddleware      ("wmw"),

+    mSubDefaultQueue    (NULL),

     mSubSource          (NULL),

+    mFilename           (NULL),

     sendSync            (false),

-    mPubTransport       (NULL),

-    mSubTransport       (NULL),

-    mPubManager         (NULL),

-    mMamaLogLevel       (MAMA_LOG_LEVEL_WARN)

+    mQuietness          (0),

+    mMamaLogLevel       (MAMA_LOG_LEVEL_WARN),

+    managerCallback     (NULL),

+    syncTimer           (NULL)

{}

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

index 5dce30f..4f5975f 100644

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

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

@@ -91,7 +91,7 @@ private:

     MamaTransport*           mDictTransport;

     bool                     mDictionaryComplete;

     int                      mQuietness;

-    int                                                                                     mBuildDataDict;

+    bool                                                                                mBuildDataDict;

     const char*              mSourceName;

     MamaDictionary*          mDictionary;

     void*                    mSubscriptionCallback;

@@ -401,13 +401,13 @@ MamaSymbolListSubscriber::MamaSymbolListSubscriber ():

     mDictTransport                     (NULL),

     mDictionaryComplete                (false),

     mQuietness                         (0),

+             mBuildDataDict                     (true),

     mSourceName                        (NULL),

     mDictionary                        (NULL),

     mSubscriptionCallback              (NULL),

     mSymbolListSubscriptionCallback    (NULL),

     mQueueGroup                        (NULL),

-    mMamaLogLevel                      (MAMA_LOG_LEVEL_WARN),

-              mBuildDataDict                     (true)

+    mMamaLogLevel                      (MAMA_LOG_LEVEL_WARN)

{}

  

 MamaSymbolListSubscriber::~MamaSymbolListSubscriber ()



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


Re: [PATCH] [mamda] map a delete msg through mamda as an error callback

Mike Schonberg <mschonberg@...>
 

-----Original Message-----
From: openmama-dev-bounces@lists.openmama.org [mailto:openmama-dev-
bounces@lists.openmama.org] On Behalf Of Ian Bell
Sent: Friday, May 18, 2012 8:58 AM
To: openmama-dev@lists.openmama.org
Subject: [Openmama-dev] [PATCH] [mamda] map a delete msg through mamda as an
error callback

commit be5ec93af947d5ed9458bf8a5e05b7300a9322d6

Author: Ian Bell <IBell@nyx.com>

Date: Thu May 17 21:47:41 2012 +0100



[mamda] map a delete msg through mamda as an error callback
We need a little more information here. What is a "delete" message? When/why does it get sent? Why is it an error? This comment will ultimately go into the release notes.

Regards,
-Mike


Signed-off-by: Ian Bell <IBell@nyx.com>



diff --git a/mama/c_cpp/src/c/mama/status.h b/mama/c_cpp/src/c/mama/status.h

index 1c48c00..ab51f63 100644

--- a/mama/c_cpp/src/c/mama/status.h

+++ b/mama/c_cpp/src/c/mama/status.h

@@ -94,6 +94,8 @@ typedef enum

MAMA_STATUS_INVALID_QUEUE = 27,

/* Not modifiable */

MAMA_STATUS_NOT_MODIFIABLE = 28,

+ /* Message Type DELETE */

+ MAMA_STATUS_DELETE = 29,

/* Not permissioned for the subject */

MAMA_STATUS_NOT_PERMISSIONED =
4001,

/* Subscription is in an invalid state. */

diff --git a/mama/c_cpp/src/c/status.c b/mama/c_cpp/src/c/status.c

index e8c1c31..f5cb3ff 100644

--- a/mama/c_cpp/src/c/status.c

+++ b/mama/c_cpp/src/c/status.c

@@ -57,6 +57,7 @@ mamaStatus_stringForStatus (mama_status status)

case MAMA_STATUS_NOT_INSTALLED : return "NOT_INSTALLED";

case MAMA_STATUS_NO_BRIDGE_IMPL : return "NO_BRIDGE_IMPL";

case MAMA_STATUS_INVALID_QUEUE : return "INVALID_QUEUE";

+ case MAMA_STATUS_DELETE : return "STATUS_DELETE";

case MAMA_STATUS_NOT_MODIFIABLE : return "NOT_MODIFIABLE";

case MAMA_STATUS_NOT_PERMISSIONED : return
"MAMA_STATUS_NOT_PERMISSIONED";

case MAMA_STATUS_SUBSCRIPTION_INVALID_STATE: return
"MAMA_STATUS_SUBSCRIPTION_INVALID_STATE";

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

index 52060d9..65da8d9 100644

--- a/mama/jni/src/com/wombat/mama/MamaMsgStatus.java

+++ b/mama/jni/src/com/wombat/mama/MamaMsgStatus.java

@@ -81,6 +81,10 @@ public class MamaMsgStatus

/** Message with duplicate sequence number */

public static final short STATUS_DUPLICATE = 15;

+ /** Message with the type of DELETE */

+ public static final short STATUS_DELETE = 17;

+

+

public static final short STATUS_EXCEPTION = 999;

/**

diff --git a/mamda/c_cpp/src/cpp/MamdaSubscription.cpp
b/mamda/c_cpp/src/cpp/MamdaSubscription.cpp

index 9b6599c..d9a9d30 100644

--- a/mamda/c_cpp/src/cpp/MamdaSubscription.cpp

+++ b/mamda/c_cpp/src/cpp/MamdaSubscription.cpp

@@ -471,6 +471,21 @@ namespace Wombat

switch (msgType)

{

case MAMA_MSG_TYPE_DELETE:

+ if (subscription->checkDebugLevel (MAMA_LOG_LEVEL_FINE))

+ {

+ const char *contentSymbol = "N/A";

+ msg.tryString (MamdaCommonFields::ISSUE_SYMBOL,
contentSymbol);

+

+ mama_forceLog (MAMA_LOG_LEVEL_FINE,

+ "MamdaSubscription (%s.%s(%s)) "

+ "ignoring msg. type: %s\n",

+ mSource->getPublisherSourceName(),

+ mSymbol.c_str (),

+ contentSymbol,

+ msg.getMsgTypeName());

+ }

+ onError (subscription, MAMA_STATUS_DELETE , "Msg
Type Delete");

+ return;

case MAMA_MSG_TYPE_EXPIRE:

if (subscription->checkDebugLevel (MAMA_LOG_LEVEL_FINE))

{

@@ -566,6 +581,11 @@ namespace Wombat

code = MAMDA_ERROR_BAD_SYMBOL;

errStr = "bad symbol";

break;

+ case MAMA_STATUS_DELETE:

+ severity = MAMDA_SEVERITY_OK;

+ code = MAMDA_ERROR_DELETE;

+ errStr = "message type delete";

+ break;

case MAMA_STATUS_TIMEOUT:

severity = MAMDA_SEVERITY_HIGH;

code = MAMDA_ERROR_TIME_OUT;

diff --git a/mamda/c_cpp/src/cpp/mamda/MamdaErrorListener.h
b/mamda/c_cpp/src/cpp/mamda/MamdaErrorListener.h

index d93877f..5168987 100644

--- a/mamda/c_cpp/src/cpp/mamda/MamdaErrorListener.h

+++ b/mamda/c_cpp/src/cpp/mamda/MamdaErrorListener.h

@@ -57,7 +57,7 @@ namespace Wombat

MAMDA_ERROR_TIME_OUT,

MAMDA_ERROR_ENTITLEMENT,

MAMDA_ERROR_NOT_FOUND,

- MAMDA_ERROR_WATCH_THIS_SPACE

+ MAMDA_ERROR_DELETE

};

/**

diff --git a/mamda/java/com/wombat/mamda/MamdaErrorCode.java
b/mamda/java/com/wombat/mamda/MamdaErrorCode.java

index fa25213..59de128 100644

--- a/mamda/java/com/wombat/mamda/MamdaErrorCode.java

+++ b/mamda/java/com/wombat/mamda/MamdaErrorCode.java

@@ -72,6 +72,9 @@ public class MamdaErrorCode

/** Bandwidth exceeded */

public static final short MAMDA_ERROR_BANDWIDTH_EXCEEDED = 14;

+ /** Message of type DELETE */

+ public static final short MAMDA_ERROR_DELETE = 17;

+

public static final short MAMDA_ERROR_EXCEPTION = 999;



@@ -100,6 +103,7 @@ public class MamdaErrorCode

case MAMDA_ERROR_TOPIC_CHANGE: return "TOPIC_CHANGE";

case MAMDA_ERROR_BANDWIDTH_EXCEEDED: return "BANDWIDTH_EXCEEDED";

case MAMDA_ERROR_EXCEPTION: return "EXCEPTION PROCESSING
MESSAGE";

+ case MAMDA_ERROR_DELETE: return "MESSAGE TYPE DELETE";

default: return "UNKNOWN";

}

}

@@ -124,6 +128,7 @@ public class MamdaErrorCode

case MamaMsgStatus.STATUS_TOPIC_CHANGE: return
MAMDA_ERROR_TOPIC_CHANGE;

case MamaMsgStatus.STATUS_BANDWIDTH_EXCEEDED: return
MAMDA_ERROR_BANDWIDTH_EXCEEDED;

case MamaMsgStatus.STATUS_EXCEPTION: return
MAMDA_ERROR_EXCEPTION;

+ case MamaMsgStatus.STATUS_DELETE: return
MAMDA_ERROR_DELETE;

}

return -1;

diff --git a/mamda/java/com/wombat/mamda/MamdaSubscription.java
b/mamda/java/com/wombat/mamda/MamdaSubscription.java

index 3d82225..46efd13 100644

--- a/mamda/java/com/wombat/mamda/MamdaSubscription.java

+++ b/mamda/java/com/wombat/mamda/MamdaSubscription.java

@@ -470,10 +470,15 @@ public class MamdaSubscription

short msgType = MamaMsgType.typeForMsg (msg);

int msgStatus = MamaMsgStatus.statusForMsg (msg);

mLatestMsg = msg;

+ short mywombatStatus = 17;

+ int myplatformError = 0;

+ Exception myException = new Exception();

switch (msgType)

{

case MamaMsgType.TYPE_DELETE:

+ onError (subscription, mywombatStatus, myplatformError,
"Message Type Delete", myException);

+ return;

case MamaMsgType.TYPE_EXPIRE:

subscription.destroy();

mLatestMsg = null;


________________________________

Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient or have received this e-mail in error, please
advise the sender immediately by reply e-mail and delete this message and any
attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


Re: Upcoming Patches

Mike Schonberg <mschonberg@...>
 

Ian,

How are you generating the .patch attachments? Git am does not parse them properly; however git apply works. Git am is a lot less work because it extracts the commit comment, etc. from the patch file.

Git format-patch generates a file that works with git am.

Regards,
-Mike

-----Original Message-----
From: openmama-dev-bounces@lists.openmama.org [mailto:openmama-dev-
bounces@lists.openmama.org] On Behalf Of Ian Bell
Sent: Friday, May 18, 2012 8:53 AM
To: openmama-dev@lists.openmama.org
Subject: [Openmama-dev] Upcoming Patches

Hi



The following patches are a result of ongoing maintenance of the commercial
version of MAMA.



Patches will be submitted every 2-3 weeks to this list for review and
application to OpenMAMA. As this is the first set there are a few more than
will usually be the case.



Ian Bell

Senior Software Engineer

NYSE Technologies
IBell@nyx.com




________________________________

Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient or have received this e-mail in error, please
advise the sender immediately by reply e-mail and delete this message and any
attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


Avis transport and msg bridges not decoupled to allow use of one without the other

David @ Rai Technology
 

Hi Guys,
I have been looking that example payload and bridge code and doing some test coding around building a different bridge. Initially I was thinking of just doing the bridge and using the Avis msg payload, however I think the Avis payload and transport bridges are a little tightly coupled to allow one to be used without the other. this may be inadvertent or done for optimisation reasons but given it is the only example is not so good.

I am assuming that a transport bridge should be able to function without any hard coded information about the payload format being used, so in the code fragment below the passed in mamaMsg could be one of a nunber of payload implementations. The call mamaMsgImpl_getPayloadBuffer() should return a packed message buffer ready for passing to the transport for sending.

The Avis transport bridge makes the assumption that it will receive an Attribute object, tweaks with this object then passes it to the sending routine. I can see why it is more efficient for the getPayloadBuffer to return the Attribute object rather than a flattened buffer as the later elvin_send call takes and Attribute object as a parameter so to avoid serialising and un-serialising again the assumption is made that a pointer to the Attribute object will be passed.

Digging upstream inside the getPayloadBuffer() call it is resolved to the avis payload bridge function avismsgPayload_getByteBuffer(). In this function a pointer to the Attributes is returned instead of the Attributes being serialised with avismsgPayload_serialize(). I understand that is not optimal to serialize, then have to unserialize again only to have the message serialized again in the send but I'm thinking that ba more flexible solution would be to do it properly and create a patch to Avis to add a send method for a pre-serialised buffer.

Interested if anyone else has come across this and if any sees it as a problem.
Regards,
David

snip ----bridge/avis/publish.c ----x

 146 /*Send a message.*/
 147 mama_status
 148 avisBridgeMamaPublisher_send (publisherBridge publisher, mamaMsg msg)
 149 {
 150     mama_size_t        dataLen;
 151     mama_status        status
 152     Attributes* attributes = NULL;
 153    
 154     CHECK_PUBLISHER(publisher);
 155
 156     status = mamaMsgImpl_getPayloadBuffer (msg, (const void**)&attributes, &dataLen);
 157     if (attributes == NULL)
 158         return MAMA_STATUS_INVALID_ARG;
 159
 160     mamaMsg_updateString(msg, SUBJECT_FIELD_NAME, 0, avisPublisher(publisher)->mSubject);
 161
 162     if (!elvin_send(avisPublisher(publisher)->mAvis, attributes)) {
 163         mama_log (MAMA_LOG_LEVEL_ERROR, "avisBridgeMamaPublisher_send(): "
 164                   "Could not send message.");
 165         return MAMA_STATUS_PLATFORM;
 166     }

181 - 200 of 2305