I am developing a backend for a mobile application with Asp.Net Core and C#. What I was looking for is a self hosted messaging framework with publish subscribe pattern with any messaging protocol (MQTT, AMQP, STOMP, XMPP, WAMP, etc...) that meet the following conditions:-
1.Ability to persist session and undelivered messages to a database (redis, mongodb, etc...)
2.Clustering support on kubernetes.
3.Ability to set time to live for messages which after it finishes they expire.
4.Manual authentication of users and access control mechanism (Explained below).
I have found MQTTnet library which meet all the features I want except session persistence and clustering support.
MQTTnet offers the following interceptors at the server level to provide custom authentication and ACL :-
ConnectionValidator SubscriptionInterceptor ApplicationMessageInterceptor