skip to Main Content

Let’s say I have the following pulsar config:

pulsar:
  topicOne:
    client:
      config:
        numIoThreads: 3
        numListenerThreads: 15
    consumer:
      config:
        receiverQueueSize: 20
      count: 3
  topicTwo:
    client:
      config:
        numIoThreads: 3
        numListenerThreads: 15
    consumer:
      config:
        receiverQueueSize: 20
      count: 10

Does this mean that for topicOne there are a total of 3 io threads and a total of 15 listener threads for all the consumers? Or are these number multiplied by the consumer count.

So for topicOne that would mean that we have total of 9 io threads and a total of 45 listener threads.

Can’t seem to find this in the documentation, any reference?

2

Answers


  1. Just to clarify, you are not using Spring for Apache Pulsar, correct? I only mention this to be sure this is just a core Pulsar Java client configuration question (excellent question btw).

    My understanding is that the io threads are the number of connections from the client to the broker and the listener threads are a pool shared across all consumers used by that client. The Javadoc is really the only place I have found that talks more in depth about it.

    Login or Signup to reply.
  2. Both the ioThreads and listenerThreads are shared resources across all the producer and consumers that are created from the Pulsar Client. Thus, you would have a total of 3 io threads, and 15 listener threads regardless of how many consumers and/or producers you create from that Pulsar Client.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search