-
Notifications
You must be signed in to change notification settings - Fork 937
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers