Skip to content

Unable to get messages from non-persistent topics #2009

Description

@nikita-tomilov

Issue

I am unable to get messages from non-persistent topics while using wildcard subscription.

Publisher:

PulsarClient client = PulsarClient.builder()
        .serviceUrl("pulsar://localhost:6650")
        .build();
Producer<String> stringProducer = client.newProducer(Schema.STRING)
        .topic("non-persistent://public/default/test1")
        .create();
stringProducer.send(line);

Subscriber:

 client = PulsarClient.builder()
        .serviceUrl("pulsar://localhost:6650")
        .build();
consumer = client.newConsumer()
        .topicsPattern(Pattern.compile("non-persistent://public/default/test[12]"))
        .subscriptionName(new Date().toString())
        .subscribe();
Message msg = consumer.receive();

Expected behavior

I receive the message.

Actual behavior

No messages can be received. While debugging, we noticed that the topic list that client gets from the server by specified regexp is empty.

Server says that the message is actually sent.

After changing non-persistent to persistent, everything works just fine.

While trying to investigate this, we have changed the pulsar:// prefix to http:// and inspected http requests. Client tried to perform request GET /admin/v2/namespaces/public/default/destinations, but failed, and in the server logs there was a TooLongFrameException : Adjusted frame length exceeds 5242880: 1195725860 - discarded. From the Wireshark dump, the request's frame length is totally fine.

Steps to reproduce

  1. Run Pulsar server
  2. Run consumer
  3. Run producer
  4. Try to send the message from producer
  5. See that the message is not received

System configuration

Pulsar version: 2.0.1-incubating

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/clienttype/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions