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.activemq.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.HeaderFilterStrategyAware
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@Component("activemq") public class ActiveMQComponent extends org.apache.camel.component.jms.JmsComponent
The ActiveMQ Component.
-
-
Constructor Summary
Constructors Constructor Description ActiveMQComponent()
ActiveMQComponent(org.apache.camel.CamelContext context)
ActiveMQComponent(ActiveMQConfiguration configuration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ActiveMQComponent
activeMQComponent()
Creates an ActiveMQ Componentstatic ActiveMQComponent
activeMQComponent(String brokerURL)
Creates an ActiveMQ Component connecting to the given broker URLprotected void
addPooledConnectionFactoryService(org.apache.activemq.Service pooledConnectionFactoryService)
protected void
addSingleConnectionFactory(org.springframework.jms.connection.SingleConnectionFactory singleConnectionFactory)
protected String
convertPathToActualDestination(String path, Map<String,Object> parameters)
protected org.apache.camel.component.jms.JmsConfiguration
createConfiguration()
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)
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)
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)
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)
protected void
doInit()
protected void
doStop()
String
getBrokerURL()
boolean
isTrustAllPackages()
boolean
isUsePooledConnection()
boolean
isUseSingleConnection()
void
setBrokerURL(String brokerURL)
Sets the broker URL to use to connect to ActiveMQ.void
setConfiguration(org.apache.camel.component.jms.JmsConfiguration configuration)
Configuration of ActiveMQprotected void
setProperties(org.apache.camel.Endpoint bean, Map<String,Object> parameters)
void
setTrustAllPackages(boolean trustAllPackages)
Define if all Java packages are trusted or not (for Java object JMS message types).void
setUsePooledConnection(boolean usePooledConnection)
Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplate
which will create a new connection, session, producer for each message then close them all down again.void
setUseSingleConnection(boolean useSingleConnection)
Enables or disables whether a SpringSingleConnectionFactory
will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplate
which 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, 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, getTimeToLive, getTransactionManager, getTransactionName, getTransactionTimeout, getUsername, getWaitForProvisionCorrelationToBeUpdatedCounter, getWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime, isAcceptMessagesWhileStopping, isAllowAutoWiredConnectionFactory, isAllowAutoWiredDestinationResolver, isAllowNullBody, isAllowReplyManagerQuickStop, isAllowSerializedHeaders, isAlwaysCopyMessage, isArtemisStreamingEnabled, isAsyncConsumer, isAsyncStartListener, isAsyncStopListener, isAutoStartup, isDeliveryPersistent, isDisableReplyTo, isDisableTimeToLive, isEagerLoadingOfProperties, isErrorHandlerLogStackTrace, isExplicitQosEnabled, isExposeListenerSession, isForceSendOriginalMessage, isFormatDateHeadersToIso8601, isIncludeAllJMSXProperties, isIncludeSentJMSMessageID, isLazyCreateTransactionManager, isMapJmsMessage, isMessageIdEnabled, isMessageTimestampEnabled, isPreserveMessageQos, isPubSubNoLocal, isReplyToDeliveryPersistent, isReplyToSameDestinationAllowed, 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, setIdleTaskExecutionLimit, setIncludeAllJMSXProperties, 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, setStreamMessageTypeEnabled, setSubscriptionDurable, setSubscriptionName, setSubscriptionShared, setTaskExecutor, setTemplateConnectionFactory, setTestConnectionOnStartup, setTimeToLive, setTransacted, setTransactedInOut, setTransactionManager, setTransactionName, setTransactionTimeout, setTransferException, setTransferExchange, setUseMessageIDAsCorrelationID, setUsername, setWaitForProvisionCorrelationToBeUpdatedCounter, setWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime, supportBlobMessage
-
Methods inherited from class org.apache.camel.support.HeaderFilterStrategyComponent
getHeaderFilterStrategy, setEndpointHeaderFilterStrategy, setHeaderFilterStrategy
-
Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doStart, 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, validateURI
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
ActiveMQComponent
public ActiveMQComponent()
-
ActiveMQComponent
public ActiveMQComponent(org.apache.camel.CamelContext context)
-
ActiveMQComponent
public ActiveMQComponent(ActiveMQConfiguration configuration)
-
-
Method Detail
-
activeMQComponent
public static ActiveMQComponent activeMQComponent()
Creates an ActiveMQ Component- Returns:
- the created component
-
activeMQComponent
public static ActiveMQComponent activeMQComponent(String brokerURL)
Creates an ActiveMQ Component connecting to the given broker URL- Parameters:
brokerURL
- the URL to connect to- Returns:
- the created component
-
getBrokerURL
public String getBrokerURL()
-
setBrokerURL
@Metadata(label="common") public void setBrokerURL(String brokerURL)
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 of a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplate
which 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 SpringSingleConnectionFactory
will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplate
which 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:
setProperties
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
addPooledConnectionFactoryService
protected void addPooledConnectionFactoryService(org.apache.activemq.Service pooledConnectionFactoryService)
-
addSingleConnectionFactory
protected void addSingleConnectionFactory(org.springframework.jms.connection.SingleConnectionFactory singleConnectionFactory)
-
convertPathToActualDestination
protected String convertPathToActualDestination(String path, Map<String,Object> parameters)
- Overrides:
convertPathToActualDestination
in classorg.apache.camel.component.jms.JmsComponent
-
doInit
protected void doInit() throws Exception
- Overrides:
doInit
in classorg.apache.camel.component.jms.JmsComponent
- Throws:
Exception
-
doStop
protected void doStop() throws Exception
- Overrides:
doStop
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
setConfiguration
public void setConfiguration(org.apache.camel.component.jms.JmsConfiguration configuration)
Configuration of ActiveMQ- Overrides:
setConfiguration
in classorg.apache.camel.component.jms.JmsComponent
-
createConfiguration
protected org.apache.camel.component.jms.JmsConfiguration createConfiguration()
- Overrides:
createConfiguration
in 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:
createTemporaryTopicEndpoint
in 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:
createTopicEndpoint
in 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:
createTemporaryQueueEndpoint
in 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:
createQueueEndpoint
in classorg.apache.camel.component.jms.JmsComponent
-
-