public Task <Message> ProduceAsync(string topic, ArraySegment <byte>?key, ArraySegment <byte>?val, DateTime?timestamp = null, int?partition = null, bool blockIfQueueFull = true) { var deliveryCompletionSource = new TaskDeliveryHandler(); Produce(topic, val == null ? null : val.Value.Array, val == null ? 0 : val.Value.Offset, val == null ? 0 : val.Value.Count, key == null ? null : key.Value.Array, key == null ? 0 : key.Value.Offset, key == null ? 0 : key.Value.Count, timestamp?.Ticks, partition ?? RD_KAFKA_PARTITION_UA, blockIfQueueFull, deliveryCompletionSource); return(deliveryCompletionSource.Task); }
public Task <Message> ProduceAsync(string topic, byte[] key, byte[] val, DateTime?timestamp = null, int?partition = null, bool blockIfQueueFull = true) { var deliveryCompletionSource = new TaskDeliveryHandler(); Produce(topic, val, 0, val?.Length ?? 0, key, 0, key?.Length ?? 0, timestamp?.Ticks, partition ?? RD_KAFKA_PARTITION_UA, blockIfQueueFull, deliveryCompletionSource); return(deliveryCompletionSource.Task); }
public Task <DeliveryReport> Produce(byte[] payload, int payloadCount, byte[] key = null, int keyCount = 0, Int32 partition = RD_KAFKA_PARTITION_UA, bool blockIfQueueFull = true) { // Passes the TaskCompletionSource to the delivery report callback // via the msg_opaque pointer var deliveryCompletionSource = new TaskDeliveryHandler(); Produce(payload, payloadCount, key, keyCount, partition, deliveryCompletionSource, blockIfQueueFull); return(deliveryCompletionSource.Task); }
public Task <DeliveryReport> Produce(byte[] payload, byte[] key = null, Int32 partition = RD_KAFKA_PARTITION_UA) { // Passes the TaskCompletionSource to the delivery report callback // via the msg_opaque pointer var deliveryCompletionSource = new TaskDeliveryHandler(); Produce(payload, key, partition, deliveryCompletionSource); return(deliveryCompletionSource.Task); }
private Task <Message> Produce( string topic, byte[] val, int valOffset, int valLength, byte[] key, int keyOffset, int keyLength, DateTime?timestamp, Int32?partition, bool blockIfQueueFull ) { var deliveryCompletionSource = new TaskDeliveryHandler(); Produce(topic, val, valOffset, valLength, key, keyOffset, keyLength, timestamp, partition != null ? partition.Value : RD_KAFKA_PARTITION_UA, blockIfQueueFull, deliveryCompletionSource); return(deliveryCompletionSource.Task); }