diff --git a/gateleen-scheduler/src/main/java/org/swisspush/gateleen/scheduler/Scheduler.java b/gateleen-scheduler/src/main/java/org/swisspush/gateleen/scheduler/Scheduler.java index 277e9aac..7cbf35ba 100755 --- a/gateleen-scheduler/src/main/java/org/swisspush/gateleen/scheduler/Scheduler.java +++ b/gateleen-scheduler/src/main/java/org/swisspush/gateleen/scheduler/Scheduler.java @@ -137,12 +137,17 @@ private void trigger() { ExpiryCheckHandler.updateServerTimestampHeader(request); - vertx.eventBus().request(redisquesAddress, buildEnqueueOperation("scheduler-" + name, request.toJsonObject().put(QueueClient.QUEUE_TIMESTAMP, System.currentTimeMillis()).encode()), - (Handler>>) event -> { - if (!OK.equals(event.result().body().getString(STATUS))) { - log.error("Could not enqueue request {}", request.toJsonObject().encodePrettily()); - } - }); + String queueName = "scheduler-" + name; + JsonObject enqueOp = buildEnqueueOperation(queueName, request.toJsonObject().put(QueueClient.QUEUE_TIMESTAMP, System.currentTimeMillis()).encode()); + vertx.eventBus().request(redisquesAddress, enqueOp, (Handler>>) event -> { + if (event.failed()) { + if (log.isWarnEnabled()) log.warn("Could not enqueue request '{}' '{}'", queueName, request.getUri(), new Exception(event.cause())); + return; + } + if (!OK.equals(event.result().body().getString(STATUS))) { + log.error("Could not enqueue request {}", request.toJsonObject().encodePrettily()); + } + }); } }