Open Socolin opened 3 years ago
Can you elaborate on this a little bit more ? Do you get the IModel
object(_rabbitMqModel) from a different function using RabbitMQ
binding and use the same in GetMetricsAsync()
?
I don't gent anything, the current code reuse the same IModel for evrything, for getting the metrics, for consuming and for publishing. It should use one IModel / thread and even use 2 connections (one for publish, one for consumemer)
Thanks for clarifying that. Aside from our current implementation of IScaleMonitor and GetMetricsAsync(), can I get more info on what your function actually does as well, including the signature, etc ? This will help me narrow down on a plausible solution and also run some scenarios on our end.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
I'm using 2 trigger function, one of them with a dead letter queue
Hello,
When a function is running at the same time as the metric collector I get this exception:
Pipelining of requests forbidden
of typeSystem.NotSupportedException at RabbitMQ.Client.Impl.RpcContinuationQueue.Enqueue
The problem is that the same channel is used in different thread, this is not supported by RabbitMQ librar. Iit should use another
IModel
to do that. https://github.com/Azure/azure-functions-rabbitmq-extension/blob/09c079a229c5693a959eb3e6680645e0099469a2/src/Trigger/RabbitMQListener.cs#L187-L197