You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/06/24 11:22:26 UTC
[GitHub] [rocketmq-spring] fenghaichun opened a new issue #96: does not
resolve the placeholder for "listener.txProducerGroup()"
fenghaichun opened a new issue #96: does not resolve the placeholder for "listener.txProducerGroup()"
URL: https://github.com/apache/rocketmq-spring/issues/96
**BUG REPORT**
the following method does not resolve the placeholder for "listener.txProducerGroup()":
```
private void processTransactionListenerAnnotation(RocketMQTransactionListener listener, Object bean)
throws MQClientException {
if (transactionHandlerRegistry == null) {
throw new MQClientException("Bad usage of @RocketMQTransactionListener, " +
"the class must work with RocketMQTemplate", null);
}
if (!RocketMQLocalTransactionListener.class.isAssignableFrom(bean.getClass())) {
throw new MQClientException("Bad usage of @RocketMQTransactionListener, " +
"the class must implement interface RocketMQLocalTransactionListener",
null);
}
TransactionHandler transactionHandler = new TransactionHandler();
transactionHandler.setBeanFactory(this.applicationContext.getAutowireCapableBeanFactory());
transactionHandler.setName(listener.txProducerGroup());
transactionHandler.setBeanName(bean.getClass().getName());
transactionHandler.setListener((RocketMQLocalTransactionListener) bean);
transactionHandler.setCheckExecutor(listener.corePoolSize(), listener.maximumPoolSize(),
listener.keepAliveTime(), listener.blockingQueueSize());
RPCHook rpcHook = RocketMQUtil.getRPCHookByAkSk(applicationContext.getEnvironment(),
listener.accessKey(), listener.secretKey());
if (Objects.nonNull(rpcHook)) {
transactionHandler.setRpcHook(rpcHook);
} else {
log.debug("Access-key or secret-key not configure in " + listener + ".");
}
transactionHandlerRegistry.registerTransactionHandler(transactionHandler);
}
```
i don't know if it is a bug??
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services