When you use Microsoft Service Bus connector in Mule projects, you’ll often see this error: “The MessageProducer was closed due to an unrecoverable error.” and “Error type: SERVICEBUS:PUBLISHING“.
This error occurs for “Topic Send” for Microsoft Windows Service Bus connector. This error indicates that Azure Service Bus has closed the producer since the producer has not published for longer time i.e. it is idle for longer time and closed the connection within the timeout timespan.
These producers will be cached by default and when the mule flow publishes a message, we will get the mentioned error. It might recover in few minutes to hours and its unpredictable.
Solution to fix this issue:
Disable the setting “Cache producers” by unchecking the box and it fixes the issue.
Hope this helps! If you see any issues, please post in the comments and we can work together in understanding and fixing the issues.