English | 简体中文
- Seamless integration spring-boot-starter
- Encapsulate mq operation, easy to use
- Implement distributed transactions based on reliable message services (using AOP ideas and seamless integration with Spring, available through annotations)
- Distributed transaction support exception rollback
- Reliable message default storage: redis (self-implementation)
- Current messaging middleware support : rabbitmq
<dependency>
<groupId>top.arkstack</groupId>
<artifactId>shine-mq</artifactId>
<version>2.2.1</version>
</dependency>
Distributed transactions: based on reliable messaging services
Distributed transaction: reliable message delivery
Demo click shine-mq-demo
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;
If it helps you, then help me with a star. ^.^