Class RocketMQEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.rocketmq.RocketMQEndpoint
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.AsyncEndpoint
,org.apache.camel.CamelContextAware
,org.apache.camel.ComponentAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasCamelContext
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="3.20.0",
scheme="rocketmq",
syntax="rocketmq:topicName",
title="RocketMQ",
category=MESSAGING,
headersClass=RocketMQConstants.class)
public class RocketMQEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.AsyncEndpoint
Send and receive messages from RocketMQ cluster.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Consumer
createConsumer
(org.apache.camel.Processor processor) org.apache.camel.Producer
org.apache.camel.Exchange
createRocketExchange
(byte[] body) long
long
boolean
void
setAccessKey
(String accessKey) Access key for RocketMQ ACL.void
setConsumerGroup
(String consumerGroup) Consumer group name.void
setNamesrvAddr
(String namesrvAddr) Name server address of RocketMQ cluster.void
setProducerGroup
(String producerGroup) Producer group name.void
setReplyToConsumerGroup
(String replyToConsumerGroup) Consumer group name used for receiving response.void
setReplyToTopic
(String replyToTopic) Topic used for receiving response when using in-out pattern.void
setRequestTimeoutCheckerIntervalMillis
(long requestTimeoutCheckerIntervalMillis) Check interval milliseconds of request timeout.void
setRequestTimeoutMillis
(long requestTimeoutMillis) Timeout milliseconds of receiving response when using in-out pattern.void
setSecretKey
(String secretKey) Secret key for RocketMQ ACL.void
setSendTag
(String sendTag) Each message would be sent with this tag.void
setSubscribeTags
(String subscribeTags) Subscribe tags of consumer.void
setTopicName
(String topicName) Topic name of this endpoint.void
setWaitForSendResult
(boolean waitForSendResult) Whether waiting for send result before routing to next endpoint.Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, 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, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.ComponentAware
getComponent, getComponent, setComponent
Methods inherited from interface org.apache.camel.Endpoint
configureExchange, configureProperties, createAsyncProducer, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, getExchangePattern, isLenientProperties, isSingletonProducer, setCamelContext
Methods inherited from interface org.apache.camel.IsSingleton
isSingleton
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
RocketMQEndpoint
public RocketMQEndpoint() -
RocketMQEndpoint
-
-
Method Details
-
createProducer
public org.apache.camel.Producer createProducer()- Specified by:
createProducer
in interfaceorg.apache.camel.Endpoint
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Specified by:
createConsumer
in interfaceorg.apache.camel.Endpoint
- Throws:
Exception
-
createRocketExchange
public org.apache.camel.Exchange createRocketExchange(byte[] body) -
getTopicName
-
setTopicName
Topic name of this endpoint. -
getSubscribeTags
-
setSubscribeTags
Subscribe tags of consumer. Multiple tags could be split by "||", such as "TagA||TagB" -
getSendTag
-
setSendTag
Each message would be sent with this tag. -
getNamesrvAddr
-
setNamesrvAddr
Name server address of RocketMQ cluster. -
getProducerGroup
-
setProducerGroup
Producer group name. -
getConsumerGroup
-
setConsumerGroup
Consumer group name. -
getReplyToTopic
-
setReplyToTopic
Topic used for receiving response when using in-out pattern. -
getReplyToConsumerGroup
-
setReplyToConsumerGroup
Consumer group name used for receiving response. -
getRequestTimeoutMillis
public long getRequestTimeoutMillis() -
setRequestTimeoutMillis
public void setRequestTimeoutMillis(long requestTimeoutMillis) Timeout milliseconds of receiving response when using in-out pattern. -
getRequestTimeoutCheckerIntervalMillis
public long getRequestTimeoutCheckerIntervalMillis() -
setRequestTimeoutCheckerIntervalMillis
public void setRequestTimeoutCheckerIntervalMillis(long requestTimeoutCheckerIntervalMillis) Check interval milliseconds of request timeout. -
isWaitForSendResult
public boolean isWaitForSendResult() -
setWaitForSendResult
public void setWaitForSendResult(boolean waitForSendResult) Whether waiting for send result before routing to next endpoint. -
getAccessKey
-
setAccessKey
Access key for RocketMQ ACL. -
getSecretKey
-
setSecretKey
Secret key for RocketMQ ACL.
-