org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.isPreAcknowledge()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(8.4k)|赞(0)|评价(0)|浏览(75)

本文整理了Java中org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.isPreAcknowledge()方法的一些代码示例,展示了ActiveMQConnectionFactory.isPreAcknowledge()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ActiveMQConnectionFactory.isPreAcknowledge()方法的具体详情如下:
包路径:org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
类名称:ActiveMQConnectionFactory
方法名:isPreAcknowledge

ActiveMQConnectionFactory.isPreAcknowledge介绍

暂无

代码示例

代码示例来源:origin: apache/activemq-artemis

@Test(timeout = 10000)
public void testActiveMQConnectionFactoryFromPropertiesJNDI() throws Exception {
 Properties properties = new Properties();
 properties.setProperty(TYPE, ActiveMQConnectionFactory.class.getName());
 properties.setProperty(FACTORY, JNDIReferenceFactory.class.getName());
 String brokerURL = "vm://0";
 String connectionTTL = "1000";
 String preAcknowledge = "true";
 properties.setProperty("brokerURL", brokerURL);
 properties.setProperty("connectionTTL", connectionTTL);
 properties.setProperty("preAcknowledge", preAcknowledge);
 Reference reference = from(properties);
 ActiveMQConnectionFactory object = getObject(reference, ActiveMQConnectionFactory.class);
 assertEquals(Long.parseLong(connectionTTL), object.getConnectionTTL());
 assertEquals(Boolean.parseBoolean(preAcknowledge), object.isPreAcknowledge());
}

代码示例来源:origin: apache/activemq-artemis

@Test
public void testDefaultConnectionFactory() throws Exception {
 ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter();
 ra.setConnectorClassName(InVMConnectorFactory.class.getName());
 ActiveMQConnectionFactory factory = ra.getDefaultActiveMQConnectionFactory();
 Assert.assertEquals(factory.getCallTimeout(), ActiveMQClient.DEFAULT_CALL_TIMEOUT);
 Assert.assertEquals(factory.getClientFailureCheckPeriod(), ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD);
 Assert.assertEquals(factory.getClientID(), null);
 Assert.assertEquals(factory.getConnectionLoadBalancingPolicyClassName(), ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME);
 Assert.assertEquals(factory.getConnectionTTL(), ActiveMQClient.DEFAULT_CONNECTION_TTL);
 Assert.assertEquals(factory.getConsumerMaxRate(), ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE);
 Assert.assertEquals(factory.getConsumerWindowSize(), ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE);
 Assert.assertEquals(factory.getDupsOKBatchSize(), ActiveMQClient.DEFAULT_ACK_BATCH_SIZE);
 Assert.assertEquals(factory.getMinLargeMessageSize(), ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE);
 Assert.assertEquals(factory.getProducerMaxRate(), ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE);
 Assert.assertEquals(factory.getConfirmationWindowSize(), ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE);
 // by default, reconnect attempts is set to -1
 Assert.assertEquals(-1, factory.getReconnectAttempts());
 Assert.assertEquals(factory.getRetryInterval(), ActiveMQClient.DEFAULT_RETRY_INTERVAL);
 Assert.assertEquals(factory.getRetryIntervalMultiplier(), ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, 0.00001);
 Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(), ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE);
 Assert.assertEquals(factory.getThreadPoolMaxSize(), ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE);
 Assert.assertEquals(factory.getTransactionBatchSize(), ActiveMQClient.DEFAULT_ACK_BATCH_SIZE);
 Assert.assertEquals(factory.isAutoGroup(), ActiveMQClient.DEFAULT_AUTO_GROUP);
 Assert.assertEquals(factory.isBlockOnAcknowledge(), ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE);
 Assert.assertEquals(factory.isBlockOnNonDurableSend(), ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
 Assert.assertEquals(factory.isBlockOnDurableSend(), ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
 Assert.assertEquals(factory.isPreAcknowledge(), ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE);
 Assert.assertEquals(factory.isUseGlobalPools(), ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS);
}

代码示例来源:origin: apache/activemq-artemis

@Test
public void testCreateConnectionFactoryNoOverrides() throws Exception {
 ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter();
 ra.setConnectorClassName(InVMConnectorFactory.class.getName());
 ActiveMQConnectionFactory factory = ra.getConnectionFactory(new ConnectionFactoryProperties());
 Assert.assertEquals(factory.getCallTimeout(), ActiveMQClient.DEFAULT_CALL_TIMEOUT);
 Assert.assertEquals(factory.getClientFailureCheckPeriod(), ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD);
 Assert.assertEquals(factory.getClientID(), null);
 Assert.assertEquals(factory.getConnectionLoadBalancingPolicyClassName(), ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME);
 Assert.assertEquals(factory.getConnectionTTL(), ActiveMQClient.DEFAULT_CONNECTION_TTL);
 Assert.assertEquals(factory.getConsumerMaxRate(), ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE);
 Assert.assertEquals(factory.getConsumerWindowSize(), ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE);
 Assert.assertEquals(factory.getDupsOKBatchSize(), ActiveMQClient.DEFAULT_ACK_BATCH_SIZE);
 Assert.assertEquals(factory.getMinLargeMessageSize(), ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE);
 Assert.assertEquals(factory.getProducerMaxRate(), ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE);
 Assert.assertEquals(factory.getConfirmationWindowSize(), ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE);
 // by default, reconnect attempts is set to -1
 Assert.assertEquals(-1, factory.getReconnectAttempts());
 Assert.assertEquals(factory.getRetryInterval(), ActiveMQClient.DEFAULT_RETRY_INTERVAL);
 Assert.assertEquals(factory.getRetryIntervalMultiplier(), ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, 0.000001);
 Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(), ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE);
 Assert.assertEquals(factory.getThreadPoolMaxSize(), ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE);
 Assert.assertEquals(factory.getTransactionBatchSize(), ActiveMQClient.DEFAULT_ACK_BATCH_SIZE);
 Assert.assertEquals(factory.isAutoGroup(), ActiveMQClient.DEFAULT_AUTO_GROUP);
 Assert.assertEquals(factory.isBlockOnAcknowledge(), ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE);
 Assert.assertEquals(factory.isBlockOnNonDurableSend(), ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
 Assert.assertEquals(factory.isBlockOnDurableSend(), ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
 Assert.assertEquals(factory.isPreAcknowledge(), ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE);
 Assert.assertEquals(factory.isUseGlobalPools(), ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS);
}

代码示例来源:origin: apache/activemq-artemis

Assert.assertEquals(factory.isBlockOnNonDurableSend(), !ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
Assert.assertEquals(factory.isBlockOnDurableSend(), !ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
Assert.assertEquals(factory.isPreAcknowledge(), !ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE);
Assert.assertEquals(factory.isUseGlobalPools(), !ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS);

代码示例来源:origin: apache/activemq-artemis

Assert.assertEquals(cf.isBlockOnNonDurableSend(), blockOnNonDurableSend);
Assert.assertEquals(cf.isAutoGroup(), autoGroup);
Assert.assertEquals(cf.isPreAcknowledge(), preAcknowledge);
Assert.assertEquals(cf.getConnectionLoadBalancingPolicyClassName(), loadBalancingPolicyClassName);
Assert.assertEquals(cf.getDupsOKBatchSize(), dupsOKBatchSize);

代码示例来源:origin: apache/activemq-artemis

Assert.assertEquals(factory.isBlockOnNonDurableSend(), !ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
Assert.assertEquals(factory.isBlockOnDurableSend(), !ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
Assert.assertEquals(factory.isPreAcknowledge(), !ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE);
Assert.assertEquals(factory.isUseGlobalPools(), !ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS);

代码示例来源:origin: apache/activemq-artemis

Assert.assertEquals(blockOnNonDurableSend, temp.isBlockOnNonDurableSend());
Assert.assertEquals(autoGroup, temp.isAutoGroup());
Assert.assertEquals(preAcknowledge, temp.isPreAcknowledge());
Assert.assertEquals(loadBalancingPolicyClassName, temp.getConnectionLoadBalancingPolicyClassName());
Assert.assertEquals(useGlobalPools, temp.isUseGlobalPools());

代码示例来源:origin: apache/activemq-artemis

Assert.assertEquals(blockOnNonDurableSend, cf.isBlockOnNonDurableSend());
Assert.assertEquals(autoGroup, cf.isAutoGroup());
Assert.assertEquals(preAcknowledge, cf.isPreAcknowledge());
Assert.assertEquals(loadBalancingPolicyClassName, cf.getConnectionLoadBalancingPolicyClassName());
Assert.assertEquals(useGlobalPools, cf.isUseGlobalPools());

代码示例来源:origin: apache/activemq-artemis

cf.isBlockOnNonDurableSend();
cf.isAutoGroup();
cf.isPreAcknowledge();
cf.getConnectionLoadBalancingPolicyClassName();
cf.getDupsOKBatchSize();

相关文章

微信公众号

最新文章

更多

ActiveMQConnectionFactory类方法