Is there a way to read the value of a feature toggle from an external microservice?

224 Views Asked by At

Currently, we have Togglz set up with our app A. I'm trying to read whether or not a certain feature toggle is enabled from microservice B (in order to allow/disallow traffic from A to access B).

App A points to this endpoint to gather all feature toggles, but I'm unsure of how to access this db from microservice B

promiseFeatureData = $.ajax({
  type: 'GET',
  url: '/big-repo/restServices/util/features/app-a',
  dataType: 'json',```
1

There are 1 best solutions below

1
AlaskaStack On

Aloha,

did you try the StateRepository in an TogglzConfiguration in Microservice B? That should enable you to read/write to the state of features.

Cheers