Package org.apache.pulsar.client.api
Interface MessageListenerExecutor
public interface MessageListenerExecutor
Interface for providing service to execute message listeners.
-
Method Summary
-
Method Details
-
execute
select a thread by message to execute the runnable!Suggestions:
1. The message listener task will be submitted to this executor for execution, so the implementations of this interface should carefully consider execution order if sequential consumption is required.
2. The users should release resources(e.g. threads) of the executor after closing the consumer to avoid leaks.
- Parameters:
message
- the messagerunnable
- the runnable to execute, that is, the message listener task
-