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.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,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.
-
-
Constructor Summary
Constructors Constructor Description RocketMQEndpoint()
RocketMQEndpoint(String endpointUri, RocketMQComponent component)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.Consumer
createConsumer(org.apache.camel.Processor processor)
org.apache.camel.Producer
createProducer()
org.apache.camel.Exchange
createRocketExchange(byte[] body)
String
getAccessKey()
String
getConsumerGroup()
String
getNamesrvAddr()
String
getProducerGroup()
String
getReplyToConsumerGroup()
String
getReplyToTopic()
long
getRequestTimeoutCheckerIntervalMillis()
long
getRequestTimeoutMillis()
String
getSecretKey()
String
getSendTag()
String
getSubscribeTags()
String
getTopicName()
boolean
isWaitForSendResult()
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, doStart, doStop, 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, 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.Endpoint
configureExchange, configureProperties, createAsyncProducer, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, getExchangePattern, isLenientProperties, isSingletonProducer, setCamelContext
-
-
-
-
Constructor Detail
-
RocketMQEndpoint
public RocketMQEndpoint()
-
RocketMQEndpoint
public RocketMQEndpoint(String endpointUri, RocketMQComponent component)
-
-
Method Detail
-
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
public String getTopicName()
-
setTopicName
public void setTopicName(String topicName)
Topic name of this endpoint.
-
getSubscribeTags
public String getSubscribeTags()
-
setSubscribeTags
public void setSubscribeTags(String subscribeTags)
Subscribe tags of consumer. Multiple tags could be split by "||", such as "TagA||TagB"
-
getSendTag
public String getSendTag()
-
setSendTag
public void setSendTag(String sendTag)
Each message would be sent with this tag.
-
getNamesrvAddr
public String getNamesrvAddr()
-
setNamesrvAddr
public void setNamesrvAddr(String namesrvAddr)
Name server address of RocketMQ cluster.
-
getProducerGroup
public String getProducerGroup()
-
setProducerGroup
public void setProducerGroup(String producerGroup)
Producer group name.
-
getConsumerGroup
public String getConsumerGroup()
-
setConsumerGroup
public void setConsumerGroup(String consumerGroup)
Consumer group name.
-
getReplyToTopic
public String getReplyToTopic()
-
setReplyToTopic
public void setReplyToTopic(String replyToTopic)
Topic used for receiving response when using in-out pattern.
-
getReplyToConsumerGroup
public String getReplyToConsumerGroup()
-
setReplyToConsumerGroup
public void setReplyToConsumerGroup(String replyToConsumerGroup)
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
public String getAccessKey()
-
setAccessKey
public void setAccessKey(String accessKey)
Access key for RocketMQ ACL.
-
getSecretKey
public String getSecretKey()
-
setSecretKey
public void setSecretKey(String secretKey)
Secret key for RocketMQ ACL.
-
-