merlimat commented on a change in pull request #69: [ISSUE #68][feat]add Option
config for init (#68)
URL: https://github.com/apache/pulsar-client-go/pull/69#discussion_r342866432
##########
File path: README.md
##########
@@ -79,17 +75,11 @@ fmt.Println("Published message")
Create a Consumer:
```go
-client, err := pulsar.NewClient(pulsar.ClientOptions{
- URL: "pulsar://localhost:6650",
-})
+client, err := pulsar.NewClient("pulsar://localhost:6650")
defer client.Close()
-consumer, err := client.Subscribe(pulsar.ConsumerOptions{
- Topic: "my-topic",
- SubscriptionName: "my-sub",
- Type: pulsar.Shared,
- })
+consumer, err := client.Subscribe("my-sub", WithTopics("my-topic"),
WithSubscriptionType(Shared))
Review comment:
Given that topic is a mandatory argument, why is it being treated
differently than subscription name?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services