Apache Artemis

聊聊artemis的individualAcknowledge

旧城冷巷雨未停 提交于 2020-02-26 05:13:05
序 本文主要研究一下artemis的individualAcknowledge acknowledge activemq-artemis-2.11.0/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java public class ActiveMQMessage implements javax.jms.Message { //...... public void acknowledge() throws JMSException { if (session != null) { try { if (session.isClosed()) { throw ActiveMQClientMessageBundle.BUNDLE.sessionClosed(); } if (individualAck) { message.individualAcknowledge(); } if (clientAck || individualAck) { session.commit(session.isBlockOnAcknowledge()); } } catch (ActiveMQException e) { throw JMSExceptionHelper

聊聊artemis的DelayedAddRedistributor

允我心安 提交于 2020-02-26 02:51:55
序 本文主要研究一下artemis的DelayedAddRedistributor addRedistributor activemq-artemis-2.11.0/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java public class QueueImpl extends CriticalComponentImpl implements Queue { //...... public synchronized void addRedistributor(final long delay) { clearRedistributorFuture(); if (redistributor != null) { // Just prompt delivery deliverAsync(); } if (delay > 0) { if (consumers.isEmpty()) { DelayedAddRedistributor dar = new DelayedAddRedistributor(executor); redistributorFuture = scheduledExecutor.schedule(dar, delay, TimeUnit

聊聊artemis的connectionTtlCheckInterval

余生颓废 提交于 2020-02-25 23:36:38
序 本文主要研究一下artemis的connectionTtlCheckInterval connectionTtlCheckInterval activemq-artemis-2.11.0/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java public class ConfigurationImpl implements Configuration, Serializable { private long connectionTtlCheckInterval = ActiveMQDefaultConfiguration.getDefaultConnectionTtlCheckInterval(); //...... @Override public long getConnectionTtlCheckInterval() { return connectionTtlCheckInterval; } @Override public ConfigurationImpl setConnectionTtlCheckInterval(long connectionTtlCheckInterval) { this

聊聊artemis的ExpiryScanner

不问归期 提交于 2020-02-25 18:52:20
序 本文主要研究一下artemis的ExpiryScanner startExpiryScanner activemq-artemis-2.11.0/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java public class PostOfficeImpl implements PostOffice, NotificationListener, BindingsFactory { //...... private ExpiryReaper expiryReaperRunnable; //...... public synchronized void startExpiryScanner() { if (expiryReaperPeriod > 0) { if (expiryReaperRunnable != null) expiryReaperRunnable.stop(); expiryReaperRunnable = new ExpiryReaper(server.getScheduledPool(), server.getExecutorFactory().getExecutor(), expiryReaperPeriod,

聊聊artemis的QuorumManager

£可爱£侵袭症+ 提交于 2020-02-25 18:43:25
序 本文主要研究一下artemis的QuorumManager ClusterTopologyListener activemq-artemis-2.11.0/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClusterTopologyListener.java public interface ClusterTopologyListener { /** * Triggered when a node joins the cluster. * * @param member * @param last if the whole cluster topology is being transmitted (after adding the listener to * the cluster connection) this parameter will be {@code true} for the last topology * member. */ void nodeUP(TopologyMember member, boolean last); /** * Triggered when a node leaves the cluster. * * @param

聊聊artemis的transactionTimeoutScanPeriod

馋奶兔 提交于 2020-02-25 15:25:37
序 本文主要研究一下artemis的transactionTimeoutScanPeriod transactionTimeoutScanPeriod activemq-artemis-2.11.0/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java public class ConfigurationImpl implements Configuration, Serializable { //...... private long transactionTimeoutScanPeriod = ActiveMQDefaultConfiguration.getDefaultTransactionTimeoutScanPeriod(); //...... @Override public long getTransactionTimeoutScanPeriod() { return transactionTimeoutScanPeriod; } @Override public ConfigurationImpl setTransactionTimeoutScanPeriod(final long period) {