0
votes

I am planning to set up an Azure service fabric, and wondering how to set one service to send some data to another microservice. I have one .net core microservice and many node microservices. If I am using guest executable to set up my node services, is there any way to communicate between those services?

1

1 Answers

0
votes

You can specify endpoints for your guest executables:

Furthermore you can ask Service Fabric to publish this endpoint to the Naming Service so other services can discover the endpoint address to this service. This enables you to be able to communicate between services that are guest executables. The published endpoint address is of the form UriScheme://IPAddressOrFQDN:Port/PathSuffix. UriScheme and PathSuffix are optional attributes. IPAddressOrFQDN is the IP address or fully qualified domain name of the node this executable gets placed on, and it is calculated for you.

E.g. in your ServiceManifest.xml you can configure the Endpoints section:

<Endpoints>
    <Endpoint Name="NodeAppTypeEndpoint" Protocol="http" Port="3000" Type="Input" />
</Endpoints>

Using this, you can map the guest executable service endpoint to the same port that your node service listens on. Ensure that each node service listens on a unique port.

The same Endpoints configuration section applies to your .net stateless service ServiceManifest.xml.

Now that you have an address for each service, you can communicate using clients appropriate to the target service RPC framework.