You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/05/17 13:26:24 UTC

[GitHub] [pulsar] wolfstudy opened a new pull request #6974: Fix 2.4.0 missing docs of cgo client

wolfstudy opened a new pull request #6974:
URL: https://github.com/apache/pulsar/pull/6974


   Signed-off-by: xiaolong.ran <rx...@apache.org>
   
   
   ### Motivation
   
   
   Fix 2.4.0 missing docs of cgo client
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Huanli-Meng commented on a change in pull request #6974: Fix 2.4.0 missing docs of cgo client

Posted by GitBox <gi...@apache.org>.
Huanli-Meng commented on a change in pull request #6974:
URL: https://github.com/apache/pulsar/pull/6974#discussion_r426329764



##########
File path: site2/website/versioned_docs/version-2.4.0/client-libraries-go.md
##########
@@ -90,6 +90,21 @@ func main() {
 }
 ```
 
+### Client operations
+
+Pulsar Go client have the following methods available:

Review comment:
       ```suggestion
   Pulsar Go client has the following methods available:
   ```

##########
File path: site2/website/versioned_docs/version-2.4.0/client-libraries-go.md
##########
@@ -90,6 +90,21 @@ func main() {
 }
 ```
 
+### Client operations
+
+Pulsar Go client have the following methods available:
+
+Method | Description | Return type
+:------|:------------|:-----------
+`CreateProducer(ProducerOptions)` | Create the producer instance(This method will block until the producer is created successfully). | `(Producer, error)`

Review comment:
       ```suggestion
   `CreateProducer(ProducerOptions)` | Create the producer instance. (This method will be blocked until the producer is created successfully.) | `(Producer, error)`
   ```

##########
File path: site2/website/versioned_docs/version-2.4.0/client-libraries-go.md
##########
@@ -330,10 +395,13 @@ Parameter | Description | Default
 `Name` | The name of the consumer |
 `AckTimeout` | | 0
 `NackRedeliveryDelay` | The delay after which to redeliver the messages that failed to be processed. Default is 1min. (See `Consumer.Nack()`) | 1 minute
-`SubscriptionType` | Available options are `Exclusive`, `Shared`, and `Failover` | `Exclusive`
+`SubscriptionType` | Available options are `Exclusive`, `Shared`, `Key_Shared` and `Failover` | `Exclusive`
 `MessageChannel` | The Go channel used by the consumer. Messages that arrive from the Pulsar topic(s) will be passed to this channel. |
 `ReceiverQueueSize` | Sets the size of the consumer's receiver queue, i.e. the number of messages that can be accumulated by the consumer before the application calls `Receive`. A value higher than the default of 1000 could increase consumer throughput, though at the expense of more memory utilization. | 1000
 `MaxTotalReceiverQueueSizeAcrossPartitions` |Set the max total receiver queue size across partitions. This setting will be used to reduce the receiver queue size for individual partitions if the total exceeds this value | 50000
+`Name` | Set the consumer name | `string`
+`ReadCompacted` | If enabled, the consumer will read messages from the compacted topic rather than reading the full message backlog of the topic.| `bool`

Review comment:
       ```suggestion
   `ReadCompacted` | If this parameter is enabled, the consumer reads messages from the compacted topic rather than reading the full message backlog of the topic.| `bool`
   ```

##########
File path: site2/website/versioned_docs/version-2.4.0/client-libraries-go.md
##########
@@ -321,6 +337,55 @@ func main() {
 }
 ```
 
+#### Schema example
+
+Here's an example usage of

Review comment:
       it's better to use a whole sentence as the leading-in sentence. such as:
   
   This example shows how to create a producer and consumer with schema.

##########
File path: site2/website/versioned_docs/version-2.4.0/client-libraries-go.md
##########
@@ -330,10 +395,13 @@ Parameter | Description | Default
 `Name` | The name of the consumer |
 `AckTimeout` | | 0
 `NackRedeliveryDelay` | The delay after which to redeliver the messages that failed to be processed. Default is 1min. (See `Consumer.Nack()`) | 1 minute
-`SubscriptionType` | Available options are `Exclusive`, `Shared`, and `Failover` | `Exclusive`
+`SubscriptionType` | Available options are `Exclusive`, `Shared`, `Key_Shared` and `Failover` | `Exclusive`
 `MessageChannel` | The Go channel used by the consumer. Messages that arrive from the Pulsar topic(s) will be passed to this channel. |
 `ReceiverQueueSize` | Sets the size of the consumer's receiver queue, i.e. the number of messages that can be accumulated by the consumer before the application calls `Receive`. A value higher than the default of 1000 could increase consumer throughput, though at the expense of more memory utilization. | 1000
 `MaxTotalReceiverQueueSizeAcrossPartitions` |Set the max total receiver queue size across partitions. This setting will be used to reduce the receiver queue size for individual partitions if the total exceeds this value | 50000
+`Name` | Set the consumer name | `string`

Review comment:
       ```suggestion
   `Name` | Set the consumer name. | `string`
   ```

##########
File path: site2/website/versioned_docs/version-2.4.0/client-libraries-go.md
##########
@@ -90,6 +90,21 @@ func main() {
 }
 ```
 
+### Client operations
+
+Pulsar Go client have the following methods available:
+
+Method | Description | Return type
+:------|:------------|:-----------
+`CreateProducer(ProducerOptions)` | Create the producer instance(This method will block until the producer is created successfully). | `(Producer, error)`
+`CreateProducerWithSchema(ProducerOptions, Schema)` | Create the producer instance with schema | `(Producer, error)`
+`Subscribe(ConsumerOptions)` | Create a `Consumer` by subscribing to a topic. | `(Consumer, error)`
+`SubscribeWithSchema(ConsumerOptions, Schema)` | Create a `Consumer` with schema by subscribing to a topic. | `(Consumer, error)`
+`CreateReader(ReaderOptions)` | Create a Reader instance. | `(Reader, error)`
+`CreateReaderWithSchema(ReaderOptions, Schema)` | Create a Reader instance with schema. | `(Reader, error)`
+`TopicPartitions(topic string)` | Fetch the list of partitions for a given topic. | `([]string, error)`
+`Close()` | Close the Client and free associated resources. | `error`

Review comment:
       ```suggestion
   `Close()` | Close the Pulsar Go client and release associated resources. | `error`
   ```

##########
File path: site2/website/versioned_docs/version-2.4.0/client-libraries-go.md
##########
@@ -268,6 +283,7 @@ Method | Description | Return type
 `NackID(MessageID)` | Acknowledge the failure to process a single message. | `error`
 `Close()` | Closes the consumer, disabling its ability to receive messages from the broker | `error`
 `RedeliverUnackedMessages()` | Redelivers *all* unacknowledged messages on the topic. In [failover](concepts-messaging.md#failover) mode, this request is ignored if the consumer isn't active on the specified topic; in [shared](concepts-messaging.md#shared) mode, redelivered messages are distributed across all consumers connected to the topic. **Note**: this is a *non-blocking* operation that doesn't throw an error. |
+`Schema()` | Message schema definition | `Schema`

Review comment:
       ```suggestion
   `Schema()` | Set the message schema definition. | `Schema`
   ```

##########
File path: site2/website/versioned_docs/version-2.4.0/client-libraries-go.md
##########
@@ -90,6 +90,21 @@ func main() {
 }
 ```
 
+### Client operations
+
+Pulsar Go client have the following methods available:
+
+Method | Description | Return type
+:------|:------------|:-----------
+`CreateProducer(ProducerOptions)` | Create the producer instance(This method will block until the producer is created successfully). | `(Producer, error)`
+`CreateProducerWithSchema(ProducerOptions, Schema)` | Create the producer instance with schema | `(Producer, error)`

Review comment:
       ```suggestion
   `CreateProducerWithSchema(ProducerOptions, Schema)` | Create a producer instance with schema. | `(Producer, error)`
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] wolfstudy merged pull request #6974: Fix 2.4.0 missing docs of cgo client

Posted by GitBox <gi...@apache.org>.
wolfstudy merged pull request #6974:
URL: https://github.com/apache/pulsar/pull/6974


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org