- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2018 04:06 PM
Hello,
I know it's possible to do something such as
var request = new sn_ws.RESTMessageV2();
request.setEndpoint('https://google.com');
request.setHttpMethod('get');
request.setMIDServer('MID SERVER NAME');
var response = request.execute();
gs.info(response.getBody());
Where request.setMIDServer('MID SERVER NAME') is used to send the message through a MID server. However, I have a MID Server Cluster with multiple MID servers and I would rather send to the cluster than to a specific MID server. Is this possible?
Thanks,
-Edwin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2018 04:53 PM
edwin,
Sending the REST API through a Mid server that belongs to a cluster will do the Job. Meaning the below code will handle the cluster.
request.setMIDServer('MID SERVER NAME');
Below is the reason:
When you set the Mid Server for the REST API in the code and execute, what really happens behind the scenes is:
1. A new entry to the ECC Queue will be made for your REST API call with topic "RESTProbe"
2. A business rule named "MID Server Cluster Management" will check if the assigned mid server is down or if its failed in upgrade. And it will take care of assigning another mid server in the cluster.
Thank you,
Aman Gurram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2018 04:53 PM
edwin,
Sending the REST API through a Mid server that belongs to a cluster will do the Job. Meaning the below code will handle the cluster.
request.setMIDServer('MID SERVER NAME');
Below is the reason:
When you set the Mid Server for the REST API in the code and execute, what really happens behind the scenes is:
1. A new entry to the ECC Queue will be made for your REST API call with topic "RESTProbe"
2. A business rule named "MID Server Cluster Management" will check if the assigned mid server is down or if its failed in upgrade. And it will take care of assigning another mid server in the cluster.
Thank you,
Aman Gurram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2018 10:03 AM
Thanks! I cracked open that Business Rule and I see that what you're saying is correct.