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 2022/04/21 01:27:04 UTC
[GitHub] [rocketmq-spring] soglad opened a new issue, #450: More than one client is created when consumer.group and consumer.topic is used in application.properties
soglad opened a new issue, #450:
URL: https://github.com/apache/rocketmq-spring/issues/450
In [ISSUE #306 ], _consumer.group_ and _consumer.topic_ have been used as a condition to auto create a pull consumer. This creates an additional consumer implicitly for an application which use these 2 properties after upgrading to a new version of the rocket-spring-starter(version after 2.2.0). Since the additional pull consumer also consume the same topic, the application owner may not aware their original consumer cannot consume all the messages any more.
Spring application which use _consumer.group_ and _consumer.group_.
```
@SpringBootApplication
public class ExampleApplication {
public static void main(String[] args) {
SpringApplication.run(ExampleApplication.class, args);
}
@Service
@RocketMQMessageListener(consumerGroup = "${rocketmq.consumer.group}", topic = "${rocketmq.consumer.topic}")
class ConsumerService implements RocketMQListener<MessageExt>{
@Override
public void onMessage(MessageExt message) {
System.out.println(LocalDateTime.now() + "\t" + message.toString());
}
}
}
```
application.properties
```
rocketmq.name-server=127.0.0.1:9876
rocketmq.consumer.group=test-group
rocketmq.consumer.topic=test-topic
```
I suggest to give some description about the resolved usage of the two properties in somewhere. Or give some log info about the creation of the pull consumer.
--
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.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] RongtongJin closed issue #450: More than one client is created when consumer.group and consumer.topic is used in application.properties
Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #450: More than one client is created when consumer.group and consumer.topic is used in application.properties
URL: https://github.com/apache/rocketmq-spring/issues/450
--
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.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] RongtongJin commented on issue #450: More than one client is created when consumer.group and consumer.topic is used in application.properties
Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #450:
URL: https://github.com/apache/rocketmq-spring/issues/450#issuecomment-1104658116
@soglad Very good advice. Would you like to submit a pull request to polish the code?
--
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.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] soglad commented on issue #450: More than one client is created when consumer.group and consumer.topic is used in application.properties
Posted by GitBox <gi...@apache.org>.
soglad commented on issue #450:
URL: https://github.com/apache/rocketmq-spring/issues/450#issuecomment-1104693389
Sure, I'd like to help. But, I would need your help about the PR process.
--
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.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org