<p>I was having an issue where the <code>rmq_buffer</code> was correctly populated with evi params, but what was transmitted over the wire was empty.  The <code>_rmq_send</code> structure contains the <code>msg</code> attribute declared as char[0] which contains the full message by allocating memory for the struct itself as well as the rmq_buffer_len: <code>shm_malloc(sizeof(rmq_send_t) + len)</code></p>

<p>Moving <code>int process_idx</code> above <code>char msg[0]</code> which was added from commit <a href="https://github.com/OpenSIPS/opensips/commit/1bc8baf84a1fbca84bf6581071bc59c58eac6552" class="commit-link"><tt>1bc8baf</tt></a> seems to fix the problem for me. </p>

<p>Am I missing something else or should it work the way it is since that commit has been in place since Jul 22, 2015?  I just couldn't get my E_ACC_CDR events published to rabbitmq on master until I tracked it down and changed this.  Thanks.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>&nbsp;&nbsp;<a href='https://github.com/OpenSIPS/opensips/pull/827'>https://github.com/OpenSIPS/opensips/pull/827</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>event_rabbitmq order of _rmq_send attributes</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/827/files#diff-0">modules/event_rabbitmq/rabbitmq_send.h</a>
    (4)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/OpenSIPS/opensips/pull/827.patch'>https://github.com/OpenSIPS/opensips/pull/827.patch</a></li>
  <li><a href='https://github.com/OpenSIPS/opensips/pull/827.diff'>https://github.com/OpenSIPS/opensips/pull/827.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/827">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciUKX_e0qw95Ac6BIwseG142lA31Yks5ptN93gaJpZM4HvvcF.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/pull/827"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>