Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

事务消息demo #15

Open
HackerRookie opened this issue Aug 14, 2018 · 0 comments
Open

事务消息demo #15

HackerRookie opened this issue Aug 14, 2018 · 0 comments
Labels

Comments

@HackerRookie
Copy link

HackerRookie commented Aug 14, 2018

业务代码 是不是要写在 executeLocalTransaction/checkLocalTransaction 里面?能否提供具体的demo

AbstractMQTransactionProducer beanObj = AbstractMQTransactionProducer.class.cast(transactionProducer.getValue());
MQTransactionProducer anno = beanObj.getClass().getAnnotation(MQTransactionProducer.class);

            TransactionMQProducer producer = new TransactionMQProducer(environment.resolvePlaceholders(anno.producerGroup()));
            producer.setNamesrvAddr(mqProperties.getNameServerAddress());
            producer.setExecutorService(executorService);
            producer.setTransactionListener(beanObj);
            producer.start();
            beanObj.setProducer(producer);

这个producer和beanObje 循环引用 会不会释放不掉的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants