You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pulsar.apache.org by Marco Robles <ma...@wizeline.com> on 2021/09/09 18:53:01 UTC

Does Reader Interface works with Partitioned Topics?

Hi Folks,

I am working on a connector between Pulsar and Apache Beam, and I need to
somehow handle the cursors with the Reader Interface. Checking the
documentation
<https://pulsar.apache.org/docs/en/concepts-clients/#reader-interface> I no
longer see the restriction/note about Reader interface not allowing
Partitioned Topics. Does this mean you can use Reader Interface with
Partitioned Topics using the cursors from this interface?

Thanks in advance

-- 

*Marco Robles* *|* WIZELINE

Software Engineer

marco.robles@wizeline.com

Amado Nervo 2200, Esfera P6, Col. Ciudad del Sol, 45050 Zapopan, Jal.

-- 
*This email and its contents (including any attachments) are being sent to
you on the condition of confidentiality and may be protected by legal
privilege. Access to this email by anyone other than the intended recipient
is unauthorized. If you are not the intended recipient, please immediately
notify the sender by replying to this message and delete the material
immediately from your system. Any further use, dissemination, distribution
or reproduction of this email is strictly prohibited. Further, no
representation is made with respect to any content contained in this email.*

Re: Does Reader Interface works with Partitioned Topics?

Posted by Matteo Merli <ma...@gmail.com>.
You can create a Reader to read from specific partitions.

Eg:

client.getPartitionsForTopic("my-topic")
   .thenAccept(partitions -> {
        for (String p : partitions) {
          client.newReader()
               .topic(p)
               .startMessageId(xxx) // Retrieve this from a checkpoint
              .create();
       }
   });

--
Matteo Merli
<ma...@gmail.com>

On Thu, Sep 9, 2021 at 11:53 AM Marco Robles <ma...@wizeline.com> wrote:
>
> Hi Folks,
>
> I am working on a connector between Pulsar and Apache Beam, and I need to somehow handle the cursors with the Reader Interface. Checking the documentation I no longer see the restriction/note about Reader interface not allowing Partitioned Topics. Does this mean you can use Reader Interface with Partitioned Topics using the cursors from this interface?
>
> Thanks in advance
>
> --
>
> Marco Robles | WIZELINE
>
> Software Engineer
>
> marco.robles@wizeline.com
>
> Amado Nervo 2200, Esfera P6, Col. Ciudad del Sol, 45050 Zapopan, Jal.
>
>
> This email and its contents (including any attachments) are being sent to
> you on the condition of confidentiality and may be protected by legal
> privilege. Access to this email by anyone other than the intended recipient
> is unauthorized. If you are not the intended recipient, please immediately
> notify the sender by replying to this message and delete the material
> immediately from your system. Any further use, dissemination, distribution
> or reproduction of this email is strictly prohibited. Further, no
> representation is made with respect to any content contained in this email.