Havret / dotnet-activemq-artemis-client

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

IProducer.SendAsync method behavior when there is no permission to SEND. #491

Open yashakapkov opened 3 weeks ago

yashakapkov commented 3 weeks ago

Description

We encountered a situation when a user lost his permision(or hasn't been received yet) to send to a queue. So, if connection

Expected behavior

In both cases it would be great to have an exception with clear reason why this producer cannot be used.

ArtemisNetClient nuget version is 2.15.0

yashakapkov commented 3 weeks ago

One more suggestion. If something happened in sending or consuming process, if connection in default(AutomaticRecoveryEnabled=true) mode, it would be great have warnigns in logs.

Havret commented 3 weeks ago

Hi @yashakapkov,

  1. Please check version 2.16.0. It was fixed as part of issue #477.
  2. We have some logs, but most of them use the trace log level, which is probably why you didn't see it. I think it makes sense to increase the logging level to info for events like these: https://github.com/Havret/dotnet-activemq-artemis-client/blob/746f82e97ea83404e70c083d3202d16d239b7ac6/src/ArtemisNetClient/AutoRecovering/AutoRecoveringConsumer.cs#L161-L181

I've extended logging in 2.17.0-preview1. Please let me know if you need anything else.

Best regards, Havret

yashakapkov commented 2 weeks ago

Hello, @Havret.

I should have tried with newer version before creating the issue. With 2.16.0 it works as we expect. Sorry for taking your time and thanks.

Sincerely, Yakov Kapkov