wdcossey / Apache.NMS.ActiveMQ.NetStd

Apache NMS for ActiveMQ Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for ActiveMQ
Apache License 2.0
14 stars 8 forks source link

Apache.NMS.MessageProducer.Send() is blocked indefinitely even when RequestTimeout.TotalMilliseconds > 0 #10

Open ittaigilat-cx opened 4 years ago

ittaigilat-cx commented 4 years ago

Issue When calling Apache.NMS.MessageProducer.Send() with RequestTimeout.TotalMilliseconds > 0, the call gets blocked indefinitely when the ActiveMQ destination service is stopped, and immediately unblocks when the service is started again. This is the use case:

  1. Open connection to ActiveMQ broker service - succeeds
  2. Send messages - succeeds
  3. Stop ActiveMQ service
  4. Send messages - all sending threads are blocked
  5. Start ActiveMQ service - blocked sending threads become unblocked and sent

This happens in Windows in a net471 application where except the thin application executable, all DLLs are netstandard2.0. Attached is a PerfView stack trace of one of the blocked threads. BlockedNMSProducerSend