All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.swisspush.redisques.RedisQuesRunner Maven / Gradle / Ivy

There is a newer version: 4.1.11
Show newest version
package org.swisspush.redisques;

import io.vertx.core.DeploymentOptions;
import io.vertx.core.Vertx;
import io.vertx.core.json.JsonObject;
import org.slf4j.LoggerFactory;
import org.swisspush.redisques.util.RedisquesConfiguration;

/**
 * Deploys vertx-redisques to vert.x.
 * Used in the standalone scenario.
 *
 * @author Marc-André Weber
 */
public class RedisQuesRunner {

    public static void main(String[] args) {

        JsonObject configuration = RedisquesConfiguration.with()
                .httpRequestHandlerEnabled(true)
                .redisReconnectAttempts(-1)
                .redisPoolRecycleTimeoutMs(-1)
                .redisReadyCheckIntervalMs(5000)
                .build().asJsonObject();

        Vertx.vertx().deployVerticle(new RedisQues(), new DeploymentOptions().setConfig(configuration),
                event -> LoggerFactory.getLogger(RedisQues.class).info("vertx-redisques started"));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy