Skip to content

Commit e93a144

Browse files
committed
Updated readme file
1 parent 4b176f4 commit e93a144

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,17 @@ The configuration required by Queue and Topic is similar and will be handled via
100100

101101
### Accessing a specific topic
102102

103-
Topic can be accessed by the core method `get_topic`. This method takes one parameter
103+
Topic can be accessed by the core method `get_topic`. This method takes two parameters
104104
1. topic name (required)
105+
2. callback function where messages will be received
105106

106107
```python
107108
from python_ms_core import Core
108-
topic = Core.get_topic(topic_name='topicName')
109+
110+
def callback(instance):
111+
print(instance.get_messages())
112+
113+
topic = Core.get_topic(topic_name='topicName', callback=callback)
109114

110115
```
111116

0 commit comments

Comments
 (0)