Shine-mq

Gitter Maven Central Latest release

English | 简体中文

🐣 Features

🐳 Maven

<dependency>
    <groupId>top.arkstack</groupId>
    <artifactId>shine-mq</artifactId>
    <version>2.2.0</version>
</dependency>

🎀 Distributed transaction

shine-mq

🎐 blog

Distributed transactions: based on reliable messaging services

Distributed transaction: reliable message delivery

🐹 Demo

Demo click shine-mq-demo

🌈 Configuration

Distributed transaction configuration, the specific configurable parameters are as follows:

    /**
     * Whether to initialize open distributed transaction defaults to false.
     */
    private boolean transaction = false;

    /**
     * Submit ack failed maximum retries.
     */

    private Integer commitMaxRetries = 3;

    /**
     * Receive message ack failed maximum attempts.
     */
    private Integer receiveMaxRetries = 3;

    /**
     * Redis middleware is provided by default to implement persistence before messages are submitted to mq.
     *
     * Can achieve it by yourself {@link top.arkstack.shine.mq.coordinator.Coordinator}
     * Or don't want to use redis, you can set it to false, there will be no redis dependencies.
     */
    private boolean redisPersistence = true;

    /**
     * Redis cache prefix
     */
    private String redisPrefix = "";

    /**
     * Prepare and Ready status message timeouts default to 3 minutes (in seconds).
     */
    private long timeOut = 3 * 60;

    /**
     * The status expiration time of returnCallback defaults to 1 day (in seconds).
     */
    private long returnCallbackTTL = 24 * 60 * 60;

The operation of encapsulating mq, the specific configurable parameters are as follows:

    /**
     * Whether to initialize the message listener, if the service is only a Producer, then close
     */
    private boolean listenerEnable = false;

    /**
     * {@link org.springframework.amqp.core.AcknowledgeMode}
     * <p>
     * 0 AUTO
     * 1 MANUAL
     * 2 NONE
     */
    private int acknowledgeMode = 1;

    /**
     * The number of unconfirmed messages that each consumer may not complete.
     */
    private Integer prefetchCount = null;

    /**
     * Number of consumers created for each configured queue.
     */
    private Integer consumersPerQueue = null;

    /**
     * Whether it is persistent, whether it is saved to the erlang database mnesia, 
     * that is, whether the restart service disappears.
     */
    private boolean durable = true;

    /**
     * Whether it is exclusive, the currently defined queue is shared by the channel in the connection,
     * and other connection connections are not accessible.
     */
    private boolean exclusive = false;

    /**
     * Whether to delete automatically, refers to the queue delete when connection.close.
     */
    private boolean autoDelete = false;

    /**
     * Whether to initialize the message listener, if the service is only a Producer, then close
     */
    private boolean listenerEnable = false;

    /**
     * Channel cache
     */
    private Integer channelCacheSize = null;

:octocat: End

If it helps you, then help me with a star. ^.^