Skip to content

fix: python client docs consumer example code missing client object#11214

Merged
merlimat merged 1 commit into
apache:masterfrom
ericsyh:fix-python-client-docs
Jul 3, 2021
Merged

fix: python client docs consumer example code missing client object#11214
merlimat merged 1 commit into
apache:masterfrom
ericsyh:fix-python-client-docs

Conversation

@ericsyh

@ericsyh ericsyh commented Jul 3, 2021

Copy link
Copy Markdown
Contributor

Signed-off-by: Eric Shen ericshenyuhao@outlook.com

Motivation

In the client-libraries-python, the sample code of Consumer missing to create the client object which consumer object relies.

import pulsar

consumer = client.subscribe('my-topic', 'my-subscription')

Modifications

I added the client object code to the sample like below

import pulsar

client = pulsar.Client('pulsar://localhost:6650')

consumer = client.subscribe('my-topic', 'my-subscription')

Impact

No code change

Signed-off-by: Eric Shen <ericshenyuhao@outlook.com>
@merlimat merlimat added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Jul 3, 2021
@merlimat merlimat added this to the 2.9.0 milestone Jul 3, 2021
@merlimat
merlimat merged commit bfb9a22 into apache:master Jul 3, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Signed-off-by: Eric Shen <ericshenyuhao@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants