You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "berg223 (via GitHub)" <gi...@apache.org> on 2025/05/20 11:07:09 UTC
[I] [Bug] pulsar-shell cannot produce message with quota and space [pulsar]
berg223 opened a new issue, #24319:
URL: https://github.com/apache/pulsar/issues/24319
### Search before reporting
- [x] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Read release policy
- [x] I understand that [unsupported versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions) don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### User environment
Broker version (4.0.4)
### Issue Description
Got error when I run command
```
./bin/pulsar-shell
client produce apache/pulsar/test-topic -m "hello pulsar"
```
I believe it's a bug of pulsar-client-tools module after debug the source code.
### Error messages
```text
Unmatched argument at index 5: 'pulsar'
Usage: <main class> client produce [-chv] [-db] [-dr] [-ekn=<encKeyName>]
[-ekv=<encKeyValue>] [-k=<key>]
[-ks=<keySchema>]
[-kvet=<keyValueEncodingType>]
[-kvk=<keyValueKey>]
[-kvkf=<keyValueKeyFile>]
[-n=<numTimesProduce>] [-r=<publishRate>]
[-s=<separator>] [-vs=<valueSchema>]
[-f=<messageFileNames>]...
[-m=<messages>]... [-p=<properties>]...
<topic>
Produce messages to a specified topic
<topic> TopicName
-c, --chunking Should split the message and publish in chunks if
message size is larger than allowed max size
-db, --disable-batching
Disable batch sending of messages
-dr, --disable-replication
Disable geo-replication for messages.
-ekn, --encryption-key-name=<encKeyName>
The public key name to encrypt payload
-ekv, --encryption-key-value=<encKeyValue>
The URI of public key to encrypt payload, for
example file:///path/to/public.key or data:
application/x-pem-file;base64,*****
-f, --files=<messageFileNames>
Comma separated file paths to send, either -m or
-f must be specified.
-h, --help Show this help message and exit.
-k, --key=<key> Partitioning key to add to each message
-ks, --key-schema=<keySchema>
Schema type (can be bytes,avro,json,string...)
-kvet, --key-value-encoding-type=<keyValueEncodingType>
Key Value Encoding Type (it can be separated or
inline)
-kvk, --key-value-key=<keyValueKey>
Value to add as message key in KeyValue schema
-kvkf, --key-value-key-file=<keyValueKeyFile>
Path to file containing the value to add as
message key in KeyValue schema. JSON and AVRO
files are supported.
-m, --messages=<messages> Messages to send, either -m or -f must be
specified. Specify -m for each message.
-n, --num-produce=<numTimesProduce>
Number of times to send message(s), the count of
messages/files * num-produce should below than
1000.
-p, --properties=<properties>
Properties to add, Comma separated key=value
string, like k1=v1,k2=v2.
-r, --rate=<publishRate> Rate (in msg/sec) at which to produce, value 0
means to produce messages as fast as possible.
-s, --separator=<separator>
Character to split messages string on default is
comma
-v, --version Print version information and exit.
-vs, --value-schema=<valueSchema>
Schema type (can be bytes,avro,json,string...)
```
### Reproducing the issue
There is two way to reproduce.
**1. Reproduce by shell**
```
./bin/pulsar-shell
client produce apache/pulsar/test-topic -m "hello pulsar"
```
**2. Reproduce by change unit testl**
1. just change the unit test [line](https://github.com/apache/pulsar/blob/v4.0.4/pulsar-client-tools/src/test/java/org/apache/pulsar/shell/PulsarShellTest.java#L150) to
```
linereader.addCmd("client produce -m \"hello pulsar\" my-topic");
```
2. run the unit test **testInteractiveMode**
3. The ut will fail
### Additional information
_No response_
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] pulsar-shell cannot produce message with quota and space [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari closed issue #24319: [Bug] pulsar-shell cannot produce message with quota and space
URL: https://github.com/apache/pulsar/issues/24319
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org