eolivelli opened a new pull request, #16603:
URL: https://github.com/apache/pulsar/pull/16603

   ### Motivation
   
   Server side filters may be very heavy weight, and currently they are running 
(very often) in the same thread that handles writes and also all the 
subscriptions.
   
   We want to improve performances in presence of heavy server side filters:
   - subscriptions should not impact each other
   - dispatching should not impact writes
   
   ### Modifications
   
   Add a new flag, `dispatcherDispatchMessagesInSubscriptionThread`, enabled by 
default, to dispatch messages to consumers in a Shared subscription using a 
separate thread than the BK executor thread.
   
   With this patch we choose a thread depending on the topic + subscription 
name and we run the actual dispatching of messages (sendMessagesToConsumers) in 
such thread.
   
   ### Verifying this change
   
   I did some manual testing with a dummy filter that slows down 
(Thread.sleep(100)) consumption and even with a simply workload (50k msg/s) I 
have verified that:
   - with this patch the noise over other subscription is smaller (without this 
change a second, non filtered subscription worked at 10% speed)
   - the impact on writes is smaller
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to