コード例 #1
0
 internal long Produce(byte[] payload, int payloadCount, byte[] key, int keyCount, int partition, IntPtr opaque, bool blockIfQueueFull)
 => (long)LibRdKafka.produce(
     handle,
     partition,
     (IntPtr)(MsgFlags.MSG_F_COPY | (blockIfQueueFull ? MsgFlags.MSG_F_BLOCK : 0)),
     payload, (UIntPtr)payloadCount,
     key, (UIntPtr)keyCount,
     opaque);
コード例 #2
0
 internal long Produce(byte[] payload, byte[] key, int partition, IntPtr opaque)
 => (long)LibRdKafka.produce(
     handle,
     partition,
     (IntPtr)MsgFlags.MSG_F_COPY,
     payload, (UIntPtr)(payload?.Length ?? 0),
     key, (UIntPtr)(key?.Length ?? 0),
     opaque);