[PATCH 1.1] status.c: Added MAMA_STATUS_SUBSCRIPTION_GAP


John Gray <jgray@...>
 

Added MAMA_STATUS_SUBSCRIPTION_GAP

 

Middleware bridges pass this status to the mamaSubscription onError callback

when the middleware detects a gap:

 

    mamaSubscription_getUserCallbacks(sub)->onError(...)

 

Middlewares that do not detect dropped messages will not use this status.

 

Note that this callback is independent of the sequence number gap detection

implemented by dqpublisher and dqstrategy.

 

Index: c_cpp/src/c/status.c

===================================================================

RCS file: /cvsroot/products/mama/c_cpp/src/c/status.c,v

retrieving revision 1.18.4.3.2.1.4.5

diff -u -r1.18.4.3.2.1.4.5 status.c

--- c_cpp/src/c/status.c 29 Aug 2011 11:52:44 -0000          1.18.4.3.2.1.4.5

+++ c_cpp/src/c/status.c              28 Dec 2011 17:47:07 -0000

@@ -61,7 +61,8 @@

     case MAMA_STATUS_SUBSCRIPTION_INVALID_STATE: return "MAMA_STATUS_SUBSCRIPTION_INVALID_STATE";

     case MAMA_STATUS_QUEUE_OPEN_OBJECTS: return "MAMA_STATUS_QUEUE_OPEN_OBJECTS";

     case MAMA_STATUS_SUBSCRIPTION_INVALID_TYPE: return "MAMA_STATUS_SUBSCRIPTION_INVALID_TYPE"; 

-

+    case MAMA_STATUS_SUBSCRIPTION_GAP: return "MAMA_STATUS_SUBSCRIPTION_GAP";

+   

 #ifdef WITH_ENTITLEMENTS

     case MAMA_ENTITLE_STATUS_NOMEM : return "ENTITLE_STATUS_NOMEM";

     case MAMA_ENTITLE_STATUS_BAD_PARAM : return "ENTITLE_STATUS_BAD_PARAM";

Index: c_cpp/src/c/mama/status.h

===================================================================

RCS file: /cvsroot/products/mama/c_cpp/src/c/mama/status.h,v

retrieving revision 1.29.4.3.2.1.4.6

diff -u -r1.29.4.3.2.1.4.6 status.h

--- c_cpp/src/c/mama/status.h 29 Aug 2011 11:52:44 -0000          1.29.4.3.2.1.4.6

+++ c_cpp/src/c/mama/status.h              28 Dec 2011 17:47:07 -0000

@@ -1,4 +1,4 @@

-/* $Id$

+/* $Id: status.h,v 1.29.4.3.2.1.4.6 2011/08/29 11:52:44 ianbell Exp $

  *

  * OpenMAMA: The open middleware agnostic messaging API

  * Copyright (C) 2011 NYSE Inc.

@@ -99,7 +99,9 @@

     /* Queue has open objects. */

     MAMA_STATUS_QUEUE_OPEN_OBJECTS          = 5002,

     /* The function isn't supported for this type of subscription. */

-    MAMA_STATUS_SUBSCRIPTION_INVALID_TYPE   = 5003

+    MAMA_STATUS_SUBSCRIPTION_INVALID_TYPE   = 5003,

+    /* The underlying transport saw a gap. */

+    MAMA_STATUS_SUBSCRIPTION_GAP            = 5004

 #ifdef WITH_ENTITLEMENTS

     /* Out of memory */

 

Signed-off-by: John Gray <jgray@...>