2017-12-25 32 views
0
// 
    // Summary: 
    //  Asynchronously send a single message to the broker. Refer to Confluent.Kafka.Producer`2.ProduceAsync(System.String,`0,`1,System.Int32,System.Boolean) 
    //  for more information. 
    // 
    // Remarks: 
    //  The partition the message is produced to is determined using the configured partitioner. 
    //  Blocks if the send queue is full. Warning: if background polling is disabled 
    //  and Poll is not being called in another thread, this will block indefinitely. 
    public Task<Message<TKey, TValue>> ProduceAsync(string topic, TKey key, TValue val); 
    // 
    // Summary: 
    //  Asynchronously send a single message to the broker. 
    // 
    // Parameters: 
    // topic: 
    //  The target topic. 
    // 
    // partition: 
    //  The target partition (if -1, this is determined by the partitioner configured 
    //  for the topic). 
    // 
    // key: 
    //  the message key (possibly null if allowed by the key serializer). 
    // 
    // val: 
    //  the message value (possibly null if allowed by the value serializer). 
    // 
    // blockIfQueueFull: 
    //  Whether or not to block if the send queue is full. If false, a KafkaExcepion 
    //  (with Error.Code == ErrorCode.Local_QueueFull) will be thrown if an attempt is 
    //  made to produce a message and the send queue is full. Warning: blockIfQueueFull 
    //  is set to true, background polling is disabled and Poll is not being called in 
    //  another thread, this will block indefinitely. 
    // 
    // Returns: 
    //  A Task which will complete with the corresponding delivery report for this request. 
    // 
    // Remarks: 
    //  If you require strict ordering of delivery reports to be maintained, you should 
    //  use a variant of ProduceAsync that takes an IDeliveryHandler parameter, not a 
    //  variant that returns a Task<Message> because Tasks are completed on arbitrary 
    //  thread pool threads and can be executed out of order. 
    public Task<Message<TKey, TValue>> ProduceAsync(string topic, TKey key, TValue val, int partition, bool blockIfQueueFull); 
    // 
    // Summary: 
    //  Asynchronously send a single message to the broker. Refer to Confluent.Kafka.Producer`2.ProduceAsync(System.String,`0,`1,System.Int32,System.Boolean) 
    //  for more information. 
    // 
    // Remarks: 
    //  Blocks if the send queue is full. Warning: if background polling is disabled 
    //  and Poll is not being called in another thread, this will block indefinitely. 
    public Task<Message<TKey, TValue>> ProduceAsync(string topic, TKey key, TValue val, int partition); 
    // 
    // Summary: 
    //  Asynchronously send a single message to the broker. Refer to Confluent.Kafka.Producer`2.ProduceAsync(System.String,`0,`1,System.Int32,System.Boolean) 
    //  for more information. 
    // 
    // Remarks: 
    //  The partition the message is produced to is determined using the configured partitioner. 
    public Task<Message<TKey, TValue>> ProduceAsync(string topic, TKey key, TValue val, bool blockIfQueueFull); 

document은 스레드 안전성 또는 안전하지 않음을 나타내지 않습니다 (ProduceAsync).Confluent.Kafka.Producer <TKey, TValue> .ProduceAsync는 스레드로부터 안전한가요?

스레드로부터 안전합니까?

답변