title: How to set message group id in activemq mapmessage in c++
body: <p>I am writing an activemq producer in C++, which is writing a map message to an activemq queue on .net platform. I am using the <code>NMSXGroupID (of the ActiveMQMapMessage type)</code> to route the message accordingly on the <code>.net</code> side when I am consuming the same message.</p>
  
  <pre><code>    private MyBytesMessage GetMyMessage(IMessage sourceMsg)
      {
          if (sourceMsg == null)
              return null;
  
          MyBytesMessage myMessage = null;
          ActiveMQMapMessage bMessage = sourceMsg as ActiveMQMapMessage;
          if (bMessage != null)
          {
              if (bMessage.Body.Keys.Count &gt; 0)
              {
                  byte[] messageBody = bMessage.Body.GetBytes("body") as byte[];
                  if (messageBody != null)
                  {
                      myMessage = new MyBytesMessage(messageBody);
                      myMessage.MessageGroupID = bMessage.NMSXGroupID;
                  }
              }
          }
          return myMessage;
      }
  </code></pre>
  
  <p>I want to set the same id from the C++ side, when I am writing the message.</p>