Skip to content

[Bug] Pulsar Shell client produce multiple -m only the first one fired #18233

Closed

Description

@tisonkun

Search before asking

  • I searched in the issues and found nothing similar.

Version

a48bc8b

Minimal reproduce step

Start a new standalone service, and send two message in one line:

client produce my-topic -m "hello" -m "tison"

What did you expect to see?

Two messages are both sent.

What did you see instead?

Only the first message is sent:

2022-10-28T11:26:45,304+0800 [pulsar-client-io-1-1] INFO  org.apache.pulsar.client.impl.ConnectionPool - [[id: 0x2dbc8195, L:/127.0.0.1:51999 - R:localhost/127.0.0.1:6650]] Connected to server
2022-10-28T11:26:45,345+0800 [pulsar-client-io-1-1] INFO  org.apache.pulsar.client.impl.ProducerStatsRecorderImpl - Starting Pulsar producer perf with config: {"topicName":"my-topic","producerName":null,"sendTimeoutMs":30000,"blockIfQueueFull":false,"maxPendingMessages":1000,"maxPendingMessagesAcrossPartitions":50000,"messageRoutingMode":"RoundRobinPartition","hashingScheme":"JavaStringHash","cryptoFailureAction":"FAIL","batchingMaxPublishDelayMicros":1000,"batchingPartitionSwitchFrequencyByPublishDelay":10,"batchingMaxMessages":1000,"batchingMaxBytes":131072,"batchingEnabled":true,"chunkingEnabled":false,"chunkMaxMessageSize":-1,"compressionType":"NONE","initialSequenceId":null,"autoUpdatePartitions":true,"autoUpdatePartitionsIntervalSeconds":60,"multiSchema":true,"accessMode":"Shared","lazyStartPartitionedProducers":false,"properties":{},"initialSubscriptionName":null}
2022-10-28T11:26:45,351+0800 [pulsar-client-io-1-1] INFO  org.apache.pulsar.client.impl.ProducerStatsRecorderImpl - Pulsar client config: {"serviceUrl":"pulsar://localhost:6650/","authPluginClassName":null,"authParams":null,"authParamMap":null,"operationTimeoutMs":30000,"lookupTimeoutMs":30000,"statsIntervalSeconds":60,"numIoThreads":1,"numListenerThreads":1,"connectionsPerBroker":1,"connectionMaxIdleSeconds":180,"useTcpNoDelay":true,"useTls":false,"tlsKeyFilePath":"","tlsCertificateFilePath":"","tlsTrustCertsFilePath":"","tlsAllowInsecureConnection":false,"tlsHostnameVerificationEnable":false,"concurrentLookupRequest":5000,"maxLookupRequest":50000,"maxLookupRedirects":20,"maxNumberOfRejectedRequestPerConnection":50,"keepAliveIntervalSeconds":30,"connectionTimeoutMs":10000,"requestTimeoutMs":60000,"initialBackoffIntervalNanos":100000000,"maxBackoffIntervalNanos":60000000000,"enableBusyWait":false,"listenerName":null,"useKeyStoreTls":false,"sslProvider":null,"tlsKeyStoreType":"JKS","tlsKeyStorePath":"","tlsKeyStorePassword":"*****","tlsTrustStoreType":"JKS","tlsTrustStorePath":"","tlsTrustStorePassword":"*****","tlsCiphers":[],"tlsProtocols":[],"memoryLimitBytes":0,"proxyServiceUrl":null,"proxyProtocol":null,"enableTransaction":false,"dnsLookupBindAddress":null,"dnsLookupBindPort":0,"socks5ProxyAddress":null,"socks5ProxyUsername":null,"socks5ProxyPassword":null}
2022-10-28T11:26:45,392+0800 [pulsar-client-io-1-1] INFO  org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [null] Creating producer on cnx [id: 0x2dbc8195, L:/127.0.0.1:51999 - R:localhost/127.0.0.1:6650]
2022-10-28T11:26:45,547+0800 [pulsar-client-io-1-1] INFO  org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-2-0] Created producer on cnx [id: 0x2dbc8195, L:/127.0.0.1:51999 - R:localhost/127.0.0.1:6650]
2022-10-28T11:26:45,579+0800 [main] INFO  org.apache.pulsar.client.impl.ProducerStatsRecorderImpl - [my-topic] [standalone-2-0] --- Publish throughput: 4.41 msg/s --- 0.00 Mbit/s --- Latency: med: 24.000 ms - 95pct: 24.000 ms - 99pct: 24.000 ms - 99.9pct: 24.000 ms - max: 24.000 ms --- BatchSize: med: 1.000 - 95pct: 1.000 - 99pct: 1.000 - 99.9pct: 1.000 - max: 1.000 --- MsgSize: med: 5.000 bytes - 95pct: 5.000 bytes - 99pct: 5.000 bytes - 99.9pct: 5.000 bytes - max: 5.000 bytes --- Ack received rate: 4.41 ack/s --- Failed messages: 0 --- Pending messages: 0
2022-10-28T11:26:45,582+0800 [pulsar-client-io-1-1] INFO  org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-2-0] Closed Producer
2022-10-28T11:26:45,583+0800 [main] INFO  org.apache.pulsar.client.impl.PulsarClientImpl - Client closing. URL: pulsar://localhost:6650/
2022-10-28T11:26:45,585+0800 [pulsar-client-io-1-1] INFO  org.apache.pulsar.client.impl.ClientCnx - [id: 0x2dbc8195, L:/127.0.0.1:51999 ! R:localhost/127.0.0.1:6650] Disconnected
2022-10-28T11:26:47,684+0800 [main] INFO  org.apache.pulsar.client.cli.PulsarClientTool - 1 messages successfully produced

Anything else?

cc @nicoloboschi @eolivelli

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

  1. added
    type/bug
    on Oct 28, 2022
  2. coderzc commented on Oct 28, 2022

    @coderzc
    Member

    Seems to be send multiple messages should use client produce my-topic -m "hello,tison".

  3. tisonkun commented on Oct 28, 2022

    @tisonkun
    MemberAuthor

    @coderzc That can be the way, while the help message says:

        -m, --messages
          Messages to send, either -m or -f must be specified. Specify -m for each 
          message. 
          Default: []
    
  4. coderzc commented on Oct 28, 2022

    @coderzc
    Member

    @coderzc That can be the way, while the help message says:

        -m, --messages
          Messages to send, either -m or -f must be specified. Specify -m for each 
          message. 
          Default: []
    

    I push pr to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedtype/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions