fix(distro-vertx) Add missing IPeriodicComponent in distro config.
RENAME
distro/vertx/src/main/resources/overlay/configs/conf-immutable-3scale-es.json
distro/vertx/src/main/resources/overlay/configs/conf-3scale-immutable-es.json
"IBufferFactoryComponent": {
"class": "io.apiman.gateway.platforms.vertx3.components.BufferFactoryComponentImpl",
"config": {}
+ },
+
+ // Periodic Component
+ "IPeriodicComponent": {
+ "class": "io.apiman.gateway.platforms.vertx3.components.PeriodicComponentImpl",
+ "config": {}
}
},

MODIFY
distro/vertx/src/main/resources/overlay/configs/conf-es.json
distro/vertx/src/main/resources/overlay/configs/conf-es.json
"IBufferFactoryComponent": {
"class": "io.apiman.gateway.platforms.vertx3.components.BufferFactoryComponentImpl",
"config": {}
+ },
+
+ // Periodic Component
+ "IPeriodicComponent": {
+ "class": "io.apiman.gateway.platforms.vertx3.components.PeriodicComponentImpl",
+ "config": {}
}
},

MODIFY
distro/vertx/src/main/resources/overlay/configs/conf-headless-es.json
distro/vertx/src/main/resources/overlay/configs/conf-headless-es.json
"IBufferFactoryComponent": {
"class": "io.apiman.gateway.platforms.vertx3.components.BufferFactoryComponentImpl",
"config": {}
+ },
+
+ // Periodic Component
+ "IPeriodicComponent": {
+ "class": "io.apiman.gateway.platforms.vertx3.components.PeriodicComponentImpl",
+ "config": {}
}
},

MODIFY
gateway/engine/3scale/src/main/java/io/apiman/gateway/engine/threescale/fetchers/AccessTokenResourceFetcher.java
gateway/engine/3scale/src/main/java/io/apiman/gateway/engine/threescale/fetchers/AccessTokenResourceFetcher.java
@@ -77,14 +77,15 @@ public class AccessTokenResourceFetcher {
if (clientResponse.statusCode() / 100 == 2) {
clientResponse.handler(data -> {
rawData.appendBuffer(data);
- System.out.println("Got some data " + data);
+ log.trace("Got some data from backend {0}", data);
})
.endHandler(end -> resultHandler.handle(rawData));
} else if (clientResponse.statusCode() == 404) {
// Is there any way to determine this in advance?
resultHandler.handle(rawData); // Empty
} else {
- String errorMessage = MessageFormat.format("Error response code: {0}, message: {1}", clientResponse.statusCode(),
+ String errorMessage = MessageFormat.format("Error response code: {0}, message: {1}",
+ clientResponse.statusCode(),
clientResponse.statusMessage());
log.error(errorMessage);
exceptionHandler.handle(new BadResponseCodeError(errorMessage));

fix(distro-vertx) Add missing IPeriodicComponent in distro config.