Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


When an application has a message which must be sent with a subscription ID, it must add that ID into the message in the same way that the message type is added. The following code shows both being added prior to sending the message:


Code Block
themeEmacs
linenumberstrue
sbuf->mtype = mtype;          // add the message type

...


sbuf->sub_id = subscribers[i] // add the subscription ID


IMPORTANT:   When reusing or resending a message, the application should ensure that the subscription ID field is cleared if it is not needed. The field is cleared by setting it to RMR_VOID_SUBID (defined in rmr.h)