Havret / dotnet-activemq-artemis-client

.NET Client for Apache ActiveMQ Artemis
https://havret.github.io/dotnet-activemq-artemis-client/
MIT License
63 stars 11 forks source link

Unauthorized Producer Creation Attempts Cause Log Flooding and Unresponsiveness #477

Closed Havret closed 7 months ago

Havret commented 7 months ago

Describe the bug

When a user without the necessary permissions tries to create a producer, the auto-recovery feature of the ActiveMQ Artemis Client continuously attempts to re-establish the producer. This process results in a flood of log messages, as shown below, and ultimately renders the application unresponsive.

2024-02-06 11:34:51.1238|TRACE|ActiveMQ.Artemis.Client.AutoRecovering.AutoRecoveringProducer|Producer recovered. 
2024-02-06 11:34:51.1375|TRACE|ActiveMQ.Artemis.Client.AutoRecovering.AutoRecoveringProducer|Producer suspended. 
2024-02-06 11:34:51.1402|TRACE|ActiveMQ.Artemis.Client.AutoRecovering.AutoRecoveringProducer|Producer resumed. 
2024-02-06 11:34:51.1421|TRACE|ActiveMQ.Artemis.Client.AutoRecovering.AutoRecoveringProducer|Retrying send after Producer reestablished. 
2024-02-06 11:34:51.1422|TRACE|ActiveMQ.Artemis.Client.AutoRecovering.AutoRecoveringProducer|Producer suspended. 
2024-02-06 11:34:51.1422|TRACE|ActiveMQ.Artemis.Client.AutoRecovering.AutoRecoveringProducer|Producer resumed. 
2024-02-06 11:34:51.1422|TRACE|ActiveMQ.Artemis.Client.AutoRecovering.AutoRecoveringProducer|Retrying send after Producer reestablished. 
2024-02-06 11:34:51.1422|TRACE|ActiveMQ.Artemis.Client.AutoRecovering.AutoRecoveringProducer|Producer suspended. 
2024-02-06 11:34:51.1422|TRACE|ActiveMQ.Artemis.Client.AutoRecovering.AutoRecoveringProducer|Producer resumed. 

Expected behavior

Instead of repeatedly attempting to recreate the producer, the client should immediately throw an exception indicating that the user is unauthorized to create a producer for the requested address.

Environment: