[
https://issues.apache.org/jira/browse/TUBEMQ-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17096336#comment-17096336
]
Guocheng Zhang commented on TUBEMQ-85:
--------------------------------------
A concurrent call problem: when two threads call initialization at the same
time, it is possible that the later call will return first, but the
initialization of the sessionFactory object has not yet been completed,
resulting in problems
> There is NPE when creating PullConsumer with TubeSingleSessionFactory
> ---------------------------------------------------------------------
>
> Key: TUBEMQ-85
> URL: https://issues.apache.org/jira/browse/TUBEMQ-85
> Project: Apache TubeMQ
> Issue Type: Bug
> Reporter: duli
> Assignee: Guocheng Zhang
> Priority: Major
> Labels: pull-request-available
> Attachments: 15882229425471.png
>
>
> There is NullPointException when when creating PullConsumer with code like
> this:
> {code:java}
> ConsumerConfig consumerConfig = new ConsumerConfig(localhost, masterAddress,
> consumerGroup);
> TubeSingleSessionFactory messageSessionFactory = new
> TubeSingleSessionFactory(consumerConfig);
> PullMessageConsumer pullConsumer =
> messageSessionFactory.createPullConsumer(consumerConfig);
> {code}
> The caused exception stack trace is:
> java.lang.NullPointerException
>
> com.tencent.tubemq.client.factory.TubeSingleSessionFactory.createPullConsumer(TubeSingleSessionFactory.java:80)
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)