| # |
| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| # |
| |
| description: The `pulsar-client` tool |
| commands: |
| - name: produce |
| description: Send a message or messages to a specific broker and topic |
| argument: topic |
| options: |
| - flags: -f, --files |
| description: Comma-separated file paths to send; either `-m` or `-f` must be specified |
| default: '[]' |
| - flags: -m, --messages |
| description: Comma-separated string of messages to send; either `-m` or `-f` must be specified |
| default: '[]' |
| - flags: -n, --num-produce |
| description: The number of times to send the message(s); the count of `messages`/`files` * `num-produce` should below than 1000 |
| default: 1 |
| - flags: -r, --rate |
| description: Rate (in messages per second) at which to produce; a value 0 means to produce messages as fast as possible |
| default: '0.0' |
| - name: consume |
| description: Consume messages from a specific broker and topic |
| argument: topic |
| options: |
| - flags: --hex |
| description: Display binary messages in hexadecimal format. |
| default: 'false' |
| - flags: -n, --num-messages |
| description: Number of messages to consume, 0 means to consume forever. |
| default: 0 |
| - flags: -r, --rate |
| description: Rate (in messages per second) at which to produce; a value 0 means to produce messages as fast as possible |
| default: '0.0' |
| - flags: -s, --subscription-name |
| description: Subscription name |
| - flags: -t, --subscription-type |
| description: "The type of the subscription. Possible values: `Exclusive`, `Shared`, `Failover`." |
| default: exclusive |
| options: |
| - flags: --auth-params |
| description: Authentication parameters, for example `key1:val1,key2:val2` |
| - flags: --auth-plugin |
| description: Authentication plugin class name |
| - flags: --url |
| description: Broker URL to which to connect |
| default: pulsar://localhost:6650/ |