Danube-Pubsub CLI - Consume messages
The consume
command retrieves messages from a specified topic.
Usage
Options
-
-s, --service-addr <SERVICE_ADDR>
Description: The service URL for the Danube broker.
Example:http://127.0.0.1:6650
-
-t, --topic <TOPIC>
Description: The topic to consume messages from.
If not specified:/default/test_topic
-
-c, --consumer <CONSUMER>
Description: The consumer name.
If not specified:consumer_pubsub
-
-m, --subscription <SUBSCRIPTION>
Description: The subscription name.
Required: Yes -
--sub-type <SUB_TYPE>
Description: The subscription type.
Default:shared
Possible values:exclusive
,shared
,fail-over
-
-h, --help
Description: Print help information.
Example: Shared Subscription
To receive messages from a shared subscription:
Example: Exclusive Subscription
To receive messages from an exclusive subscription:
To create a new exclusive subscription:
Resources
Check this article that covers how to combine the subscription types in order to obtain message queueing or fan-out pub-sub messaging patterns.