I'm going to use a third party messaging system to receive the messages for my stateful service. So I started to look at the ICommunicationListener
interface and existing samples. However, it's unclear what it should do since most examples processes inbound messages directly or indirectly in the communication listener. I can't find any way to pass inbound messages to the service.
Because of that, I can't find any meaningful reason to why the ICommunicationListener
interface or the CreateServiceReplicaListeners
method exists. The service itself already have all knowledge about how to create and configure the listeners. Thus your could just configure your own listener directly in the stateful service (using composition) without being forced to implement a specific interface.
So what do the additional layer of complexity add?