Class ActiveMQComponent
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultComponent
org.apache.camel.support.HeaderFilterStrategyComponent
org.apache.camel.component.jms.JmsComponent
org.apache.camel.component.activemq6.ActiveMQComponent
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.Component,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HeaderFilterStrategyAware,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@Component("activemq6")
public class ActiveMQComponent
extends org.apache.camel.component.jms.JmsComponent
The ActiveMQ 6.x Component.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionActiveMQComponent(org.apache.camel.CamelContext context) ActiveMQComponent(ActiveMQConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionstatic ActiveMQComponentCreates an ActiveMQ Componentstatic ActiveMQComponentactiveMQComponent(String brokerURL) Creates an ActiveMQ Component connecting to the given broker URLprotected voidaddPooledConnectionFactoryService(Object pooledConnectionFactoryService) protected voidaddSingleConnectionFactory(org.springframework.jms.connection.SingleConnectionFactory singleConnectionFactory) protected StringconvertPathToActualDestination(String path, Map<String, Object> parameters) protected org.apache.camel.component.jms.JmsConfigurationprotected org.apache.camel.component.jms.JmsEndpointcreateQueueEndpoint(String uri, org.apache.camel.component.jms.JmsComponent component, String subject, org.apache.camel.component.jms.JmsConfiguration configuration, org.apache.camel.component.jms.QueueBrowseStrategy queueBrowseStrategy) protected org.apache.camel.component.jms.JmsEndpointcreateTemporaryQueueEndpoint(String uri, org.apache.camel.component.jms.JmsComponent component, String subject, org.apache.camel.component.jms.JmsConfiguration configuration, org.apache.camel.component.jms.QueueBrowseStrategy queueBrowseStrategy) protected org.apache.camel.component.jms.JmsEndpointcreateTemporaryTopicEndpoint(String uri, org.apache.camel.component.jms.JmsComponent component, String subject, org.apache.camel.component.jms.JmsConfiguration configuration) protected org.apache.camel.component.jms.JmsEndpointcreateTopicEndpoint(String uri, org.apache.camel.component.jms.JmsComponent component, String subject, org.apache.camel.component.jms.JmsConfiguration configuration) protected voiddoInit()protected voiddoStop()booleanbooleanbooleanbooleanvoidsetBrokerURL(String brokerURL) Sets the broker URL to use to connect to ActiveMQ.voidsetConfiguration(org.apache.camel.component.jms.JmsConfiguration configuration) Configuration of ActiveMQvoidsetEmbedded(boolean embedded) Use an embedded in-memory (non-persistent) ActiveMQ broker for development and testing purposes.protected voidsetProperties(org.apache.camel.Endpoint bean, Map<String, Object> parameters) voidsetTrustAllPackages(boolean trustAllPackages) Define if all Java packages are trusted or not (for Java object JMS message types).voidsetUsePooledConnection(boolean usePooledConnection) Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplatewhich will create a new connection, session, producer for each message then close them all down again.voidsetUseSingleConnection(boolean useSingleConnection) Enables or disables whether a SpringSingleConnectionFactorywill be used so that when messages are sent to ActiveMQ from outside a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplatewhich will create a new connection, session, producer for each message then close them all down again.Methods inherited from class org.apache.camel.component.jms.JmsComponent
chooseMessageListenerContainerImplementation, configuredQoS, configureMessageListener, configureMessageListenerContainer, copy, createConnectionFactory, createDestinationResolver, createEndpoint, createInOnlyTemplate, createInOutTemplate, createListenerConnectionFactory, createMessageListenerContainer, createTemplateConnectionFactory, createTransactionManager, defaultCacheLevel, doShutdown, getAcknowledgementMode, getAcknowledgementModeName, getAllowAdditionalHeaders, getArtemisConsumerPriority, getAsyncStartStopExecutorService, getCacheLevel, getCacheLevelName, getClientId, getConcurrentConsumers, getConfiguration, getConnectionFactory, getConsumerType, getCorrelationProperty, getDefaultTaskExecutorType, getDeliveryDelay, getDeliveryMode, getDestinationResolver, getDurableSubscriptionName, getEagerPoisonBody, getErrorHandler, getErrorHandlerLoggingLevel, getExceptionListener, getExplicitQosEnabled, getIdleConsumerLimit, getIdleReceivesPerTaskLimit, getIdleTaskExecutionLimit, getJmsKeyFormatStrategy, getJmsMessageType, getJmsOperations, getListenerConnectionFactory, getMaxConcurrentConsumers, getMaxMessagesPerTask, getMessageConverter, getMessageCreatedStrategy, getMessageListenerContainerFactory, getOrCreateConnectionFactory, getOrCreateListenerConnectionFactory, getOrCreateTemplateConnectionFactory, getOrCreateTransactionManager, getPassword, getPriority, getQueueBrowseStrategy, getReceiveTimeout, getRecoveryInterval, getReplyTo, getReplyToCacheLevelName, getReplyToConcurrentConsumers, getReplyToConsumerType, getReplyToDestinationSelectorName, getReplyToMaxConcurrentConsumers, getReplyToOnTimeoutMaxConcurrentConsumers, getReplyToOverride, getReplyToType, getRequestTimeout, getRequestTimeoutCheckerInterval, getSelector, getSubscriptionName, getTaskExecutor, getTemplateConnectionFactory, getTemporaryQueueResolver, getTimeToLive, getTransactionManager, getTransactionName, getTransactionTimeout, getUsername, getWaitForProvisionCorrelationToBeUpdatedCounter, getWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime, getWaitForTemporaryReplyToToBeUpdatedCounter, getWaitForTemporaryReplyToToBeUpdatedThreadSleepingTime, isAcceptMessagesWhileStopping, isAllowAutoWiredConnectionFactory, isAllowAutoWiredDestinationResolver, isAllowNullBody, isAllowReplyManagerQuickStop, isAllowSerializedHeaders, isAlwaysCopyMessage, isArtemisStreamingEnabled, isAsyncConsumer, isAsyncStartListener, isAsyncStopListener, isAutoStartup, isDeliveryPersistent, isDisableReplyTo, isDisableTimeToLive, isEagerLoadingOfProperties, isErrorHandlerLogStackTrace, isExplicitQosEnabled, isExposeListenerSession, isForceSendOriginalMessage, isFormatDateHeadersToIso8601, isIncludeAllJMSXProperties, isIncludeCorrelationIDAsBytes, isIncludeSentJMSMessageID, isLazyCreateTransactionManager, isMapJmsMessage, isMessageIdEnabled, isMessageTimestampEnabled, isPreserveMessageQos, isPubSubNoLocal, isReplyToDeliveryPersistent, isReplyToSameDestinationAllowed, isServiceLocationEnabled, isStreamMessageTypeEnabled, isSubscriptionDurable, isSubscriptionShared, isTestConnectionOnStartup, isTransacted, isTransactedInOut, isTransferException, isTransferExchange, isUseMessageIDAsCorrelationID, jmsComponent, jmsComponent, jmsComponent, jmsComponentAutoAcknowledge, jmsComponentClientAcknowledge, jmsComponentTransacted, jmsComponentTransacted, setAcceptMessagesWhileStopping, setAcknowledgementMode, setAcknowledgementModeName, setAllowAdditionalHeaders, setAllowAutoWiredConnectionFactory, setAllowAutoWiredDestinationResolver, setAllowNullBody, setAllowReplyManagerQuickStop, setAllowSerializedHeaders, setAlwaysCopyMessage, setArtemisConsumerPriority, setArtemisStreamingEnabled, setAsyncConsumer, setAsyncStartListener, setAsyncStopListener, setAutoStartup, setCacheLevel, setCacheLevelName, setClientId, setConcurrentConsumers, setConnectionFactory, setConsumerType, setCorrelationProperty, setDefaultTaskExecutorType, setDeliveryDelay, setDeliveryMode, setDeliveryPersistent, setDestinationResolver, setDisableReplyTo, setDisableTimeToLive, setDurableSubscriptionName, setEagerLoadingOfProperties, setEagerPoisonBody, setErrorHandler, setErrorHandlerLoggingLevel, setErrorHandlerLogStackTrace, setExceptionListener, setExplicitQosEnabled, setExposeListenerSession, setForceSendOriginalMessage, setFormatDateHeadersToIso8601, setIdleConsumerLimit, setIdleReceivesPerTaskLimit, setIdleTaskExecutionLimit, setIncludeAllJMSXProperties, setIncludeCorrelationIDAsBytes, setIncludeSentJMSMessageID, setJmsKeyFormatStrategy, setJmsMessageType, setJmsOperations, setLazyCreateTransactionManager, setListenerConnectionFactory, setMapJmsMessage, setMaxConcurrentConsumers, setMaxMessagesPerTask, setMessageConverter, setMessageCreatedStrategy, setMessageIdEnabled, setMessageListenerContainerFactory, setMessageTimestampEnabled, setPassword, setPreserveMessageQos, setPriority, setPubSubNoLocal, setQueueBrowseStrategy, setReceiveTimeout, setRecoveryInterval, setReplyTo, setReplyToCacheLevelName, setReplyToConcurrentConsumers, setReplyToConsumerType, setReplyToDeliveryPersistent, setReplyToDestinationSelectorName, setReplyToMaxConcurrentConsumers, setReplyToOnTimeoutMaxConcurrentConsumers, setReplyToOverride, setReplyToSameDestinationAllowed, setReplyToType, setRequestTimeout, setRequestTimeoutCheckerInterval, setSelector, setServiceLocationEnabled, setStreamMessageTypeEnabled, setSubscriptionDurable, setSubscriptionName, setSubscriptionShared, setTaskExecutor, setTemplateConnectionFactory, setTemporaryQueueResolver, setTestConnectionOnStartup, setTimeToLive, setTransacted, setTransactedInOut, setTransactionManager, setTransactionName, setTransactionTimeout, setTransferException, setTransferExchange, setUseMessageIDAsCorrelationID, setUsername, setWaitForProvisionCorrelationToBeUpdatedCounter, setWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime, setWaitForTemporaryReplyToToBeUpdatedCounter, setWaitForTemporaryReplyToToBeUpdatedThreadSleepingTime, supportBlobMessageMethods inherited from class org.apache.camel.support.HeaderFilterStrategyComponent
getHeaderFilterStrategy, setEndpointHeaderFilterStrategy, setHeaderFilterStrategyMethods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURIMethods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doStart, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
ActiveMQComponent
public ActiveMQComponent() -
ActiveMQComponent
public ActiveMQComponent(org.apache.camel.CamelContext context) -
ActiveMQComponent
-
-
Method Details
-
activeMQComponent
Creates an ActiveMQ Component- Returns:
- the created component
-
activeMQComponent
Creates an ActiveMQ Component connecting to the given broker URL- Parameters:
brokerURL- the URL to connect to- Returns:
- the created component
-
isEmbedded
public boolean isEmbedded() -
setEmbedded
@Metadata(label="common") public void setEmbedded(boolean embedded) Use an embedded in-memory (non-persistent) ActiveMQ broker for development and testing purposes. You must have activemq-broker JAR on the classpath. -
getBrokerURL
-
setBrokerURL
Sets the broker URL to use to connect to ActiveMQ. If none configured then localhost:61616 is used by default (however can be overridden by configuration from environment variables) -
setTrustAllPackages
@Metadata(defaultValue="false", label="advanced") public void setTrustAllPackages(boolean trustAllPackages) Define if all Java packages are trusted or not (for Java object JMS message types). Notice its not recommended practice to send Java serialized objects over network. Setting this to true can expose security risks, so use this with care. -
isTrustAllPackages
public boolean isTrustAllPackages() -
setUsePooledConnection
@Metadata(defaultValue="true", label="common") public void setUsePooledConnection(boolean usePooledConnection) Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplatewhich will create a new connection, session, producer for each message then close them all down again. The default value is true. -
isUsePooledConnection
public boolean isUsePooledConnection() -
setUseSingleConnection
@Metadata(defaultValue="false", label="common") public void setUseSingleConnection(boolean useSingleConnection) Enables or disables whether a SpringSingleConnectionFactorywill be used so that when messages are sent to ActiveMQ from outside a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplatewhich will create a new connection, session, producer for each message then close them all down again. The default value is false and a pooled connection is used by default. -
isUseSingleConnection
public boolean isUseSingleConnection() -
setProperties
protected void setProperties(org.apache.camel.Endpoint bean, Map<String, Object> parameters) throws Exception- Overrides:
setPropertiesin classorg.apache.camel.support.DefaultComponent- Throws:
Exception
-
addPooledConnectionFactoryService
-
addSingleConnectionFactory
protected void addSingleConnectionFactory(org.springframework.jms.connection.SingleConnectionFactory singleConnectionFactory) -
convertPathToActualDestination
- Overrides:
convertPathToActualDestinationin classorg.apache.camel.component.jms.JmsComponent
-
doInit
- Overrides:
doInitin classorg.apache.camel.component.jms.JmsComponent- Throws:
Exception
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
setConfiguration
public void setConfiguration(org.apache.camel.component.jms.JmsConfiguration configuration) Configuration of ActiveMQ- Overrides:
setConfigurationin classorg.apache.camel.component.jms.JmsComponent
-
createConfiguration
protected org.apache.camel.component.jms.JmsConfiguration createConfiguration()- Overrides:
createConfigurationin classorg.apache.camel.component.jms.JmsComponent
-
createTemporaryTopicEndpoint
protected org.apache.camel.component.jms.JmsEndpoint createTemporaryTopicEndpoint(String uri, org.apache.camel.component.jms.JmsComponent component, String subject, org.apache.camel.component.jms.JmsConfiguration configuration) - Overrides:
createTemporaryTopicEndpointin classorg.apache.camel.component.jms.JmsComponent
-
createTopicEndpoint
protected org.apache.camel.component.jms.JmsEndpoint createTopicEndpoint(String uri, org.apache.camel.component.jms.JmsComponent component, String subject, org.apache.camel.component.jms.JmsConfiguration configuration) - Overrides:
createTopicEndpointin classorg.apache.camel.component.jms.JmsComponent
-
createTemporaryQueueEndpoint
protected org.apache.camel.component.jms.JmsEndpoint createTemporaryQueueEndpoint(String uri, org.apache.camel.component.jms.JmsComponent component, String subject, org.apache.camel.component.jms.JmsConfiguration configuration, org.apache.camel.component.jms.QueueBrowseStrategy queueBrowseStrategy) - Overrides:
createTemporaryQueueEndpointin classorg.apache.camel.component.jms.JmsComponent
-
createQueueEndpoint
protected org.apache.camel.component.jms.JmsEndpoint createQueueEndpoint(String uri, org.apache.camel.component.jms.JmsComponent component, String subject, org.apache.camel.component.jms.JmsConfiguration configuration, org.apache.camel.component.jms.QueueBrowseStrategy queueBrowseStrategy) - Overrides:
createQueueEndpointin classorg.apache.camel.component.jms.JmsComponent
-