Azure服务总线订阅客户端消息处理程序创建线程和死线程的最大数量

时间:2019-03-15 11:49:18

标签: java multithreading servicebus

SubscriptionClient接收到服务总线消息,消息接收成功,但是在日志中,我观察到MessageReceiver每次在另一个线程中都监听消息(请参阅日志)

*2019-03-15 13:23:29,229 WARN [pool-11-thread-2]   CoreMessageReceiver.java:571 - No messages received from 'service_bus_topic'. Pending receive request timed out. Returning null to the client.
2019-03-15 13:23:29,229 DEBUG [pool-10-thread-3]   MessageAndSessionPump.java:162 - Receive from entity 'service_bus_topic' returned no messages.
2019-03-15 13:23:29,230 DEBUG [pool-10-thread-3]   CoreMessageReceiver.java:551 - Receiving maximum of '1' messages from 'service_bus_topic'
2019-03-15 13:24:29,231 WARN [pool-11-thread-4]   CoreMessageReceiver.java:571 - No messages received from 'service_bus_topic'. Pending receive request timed out. Returning null to the client.
2019-03-15 13:24:29,232 DEBUG [pool-10-thread-4]   MessageAndSessionPump.java:162 - Receive from entity 'service_bus_topic' returned no messages.
2019-03-15 13:24:29,232 DEBUG [pool-10-thread-4]   CoreMessageReceiver.java:551 - Receiving maximum of '1' messages from 'service_bus_topic'
2019-03-15 13:25:29,233 WARN [pool-11-thread-3]   CoreMessageReceiver.java:571 - No messages received from 'service_bus_topic'. Pending receive request timed out. Returning null to the client.
2019-03-15 13:25:29,234 DEBUG [pool-10-thread-6]   MessageAndSessionPump.java:162 - Receive from entity 'service_bus_topic' returned no messages.
2019-03-15 13:25:29,234 DEBUG [pool-10-thread-6]   CoreMessageReceiver.java:551 - Receiving maximum of '1' messages from 'service_bus_topic'*

并且看起来疲惫的线程仍然处于锁定状态,它一直持续到线程数达到40,之后每毫秒出现另一个巨大的日志:

*2019-03-15 13:44:38,633 DEBUG [pool-10-thread-22]   RequestResponseLink.java:684 - RequestRespnseLink received response for request with id :request:925
2019-03-15 13:44:38,634 DEBUG [pool-10-thread-22]   RequestResponseLink.java:430 - Response for request with id:request:925 has status code:202
2019-03-15 13:44:38,634 DEBUG [pool-10-thread-22]   RequestResponseLink.java:467 - Completing request with id:request:925
2019-03-15 13:44:38,634 DEBUG [pool-10-thread-21]   CommonRequestResponseOperations.java:90 - CBS Token of type 'servicebus.windows.net:sastoken' sent to 'service_bus_topic'
2019-03-15 13:44:38,634 DEBUG [pool-10-thread-22]   MessagingFactory.java:575 - Sent token for service_bus_topic
2019-03-15 13:44:38,634 DEBUG [pool-10-thread-22]   CoreMessageReceiver.java:432 - Sent SAS Token and set renew timer
2019-03-15 13:44:38,634 DEBUG [pool-11-thread-1]   MessagingFactory.java:561 - Sending token for service_bus_topic
2019-03-15 13:44:38,634 DEBUG [pool-10-thread-21]   CommonRequestResponseOperations.java:79 - Sending CBS Token of type 'servicebus.windows.net:sastoken' to 'service_bus_topic'
2019-03-15 13:44:38,634 DEBUG [pool-10-thread-21]   RequestResponseLink.java:386 - Sending request with id:request:926
2019-03-15 13:44:38,634 DEBUG [ReactorThread73fd7f07-2d96-4858-989b-6cc1018f8992]   RequestResponseLink.java:949 - Starting requestResponseLink $cbs internal sender send loop
2019-03-15 13:44:38,634 DEBUG [ReactorThread73fd7f07-2d96-4858-989b-6cc1018f8992]   RequestResponseLink.java:995 - RequestResonseLink $cbs internal sender sent a request. available credit :574*

这种行为的原因是什么?

0 个答案:

没有答案