Skip to content

Commit

Permalink
[ISSUE #393]:perf topic name in test file (#394)
Browse files Browse the repository at this point in the history
close #393
  • Loading branch information
keranbingaa authored Jun 22, 2021
1 parent bf43f63 commit 191eff2
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 37 deletions.
6 changes: 3 additions & 3 deletions docs/cn/instructions/eventmesh-sdk-java-quickstart.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TCP 和 Http 示例都在**eventmesh-test**模块下

<h4>异步消息</h4>

- 创建主题FT0-e-80010000-01-1,可以通过rocketmq-console或者rocketmq tools 命令
- 创建主题TEST-TOPIC-TCP-ASYNC,可以通过rocketmq-console或者rocketmq tools 命令

- 启动消费者,订阅上一步骤已经创建的Topic

Expand All @@ -32,7 +32,7 @@ TCP 和 Http 示例都在**eventmesh-test**模块下

<h4>广播消息</h4>

- 创建主题FT0-e-80030000-01-3,可以通过rocketmq-console或者rocketmq tools 命令
- 创建主题TEST-TOPIC-TCP-BROADCAST,可以通过rocketmq-console或者rocketmq tools 命令

- 启动消费端,订阅上一步骤已经创建的Topic

Expand All @@ -56,7 +56,7 @@ TCP 和 Http 示例都在**eventmesh-test**模块下

> 生产者将事件发送给下游即可,无需等待响应
- 创建主题FT0-e-80010001-01-1,可以通过rocketmq-console或者rocketmq tools 命令
- 创建主题TEST-TOPIC-HTTP-ASYNC,可以通过rocketmq-console或者rocketmq tools 命令

- 启动消费端,订阅Topic

Expand Down
6 changes: 3 additions & 3 deletions docs/en/instructions/eventmesh-sdk-java-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the `resources` directory

#### Async msg

- create topic FT0-e-80010000-01-1 on rocketmq-console
- create topic TEST-TOPIC-TCP-ASYNC on rocketmq-console

- start consumer ,subscribe topic in previous step.

Expand All @@ -33,7 +33,7 @@ Run the main method of org.apache.eventmesh.tcp.demo.AsyncPublish

#### Broadcast msg

- create topic FT0-e-80030000-01-3 on rocketmq-console
- create topic TEST-TOPIC-TCP-BROADCAST on rocketmq-console

- start consumer ,subscribe topic in previous step.

Expand All @@ -57,7 +57,7 @@ Run the main method of org.apache.eventmesh.tcp.demo.AsyncPublishBroadcast

> producer send the event to consumer and don't need waiting response msg from consumer
- create topic FT0-e-80010001-01-1 on rocketmq-console
- create topic TEST-TOPIC-HTTP-ASYNC on rocketmq-console

- start consumer, subscribe topic

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface ClientConstants {

long DEFAULT_TIMEOUT_IN_MILLISECONDS = 3000;

String SYNC_TOPIC = "FT0-s-80000000-01-0";
String ASYNC_TOPIC = "FT0-e-80010000-01-1";
String BROADCAST_TOPIC = "FT0-e-80030000-01-3";
String SYNC_TOPIC = "TEST-TOPIC-TCP-SYNC";
String ASYNC_TOPIC = "TEST-TOPIC-TCP-ASYNC";
String BROADCAST_TOPIC = "TEST-TOPIC-TCP-BROADCAST";
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ public static UserAgent generateSubServer() {
public static Subscription generateSubscription() {
Subscription subscription = new Subscription();
List<SubscriptionItem> subscriptionItems = new ArrayList<>();
subscriptionItems.add(new SubscriptionItem("FT0-s-80000000-01-0", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC));
subscriptionItems.add(new SubscriptionItem("FT0-s-80000000-02-0", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC));
subscriptionItems.add(new SubscriptionItem("FT0-s-80000000-03-0", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC));
subscriptionItems.add(new SubscriptionItem("FT0-s-80000000-04-0", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC));
subscriptionItems.add(new SubscriptionItem("TEST-TOPIC-TCP-SYNC", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC));
subscriptionItems.add(new SubscriptionItem("TEST-TOPIC-TCP-SYNC2", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC));
subscriptionItems.add(new SubscriptionItem("TEST-TOPIC-TCP-SYNC3", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC));
subscriptionItems.add(new SubscriptionItem("TEST-TOPIC-TCP-SYNC4", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC));
subscription.setTopicList(subscriptionItems);
return subscription;
}
Expand Down
2 changes: 1 addition & 1 deletion eventmesh-runtime/src/test/java/demo/CCSubClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static void main(String[] args) throws Exception {
subClient.init();
subClient.heartbeat();
subClient.listen();
subClient.justSubscribe("FT0-s-80000000-01-0", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC);
subClient.justSubscribe("TEST-TOPIC-TCP-SYNC", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC);
subClient.registerBusiHandler(new ReceiveMsgHook() {
@Override
public void handle(Package msg, ChannelHandlerContext ctx) {
Expand Down
10 changes: 5 additions & 5 deletions eventmesh-runtime/src/test/java/demo/CClientDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public class CClientDemo {

public static Logger logger = LoggerFactory.getLogger(CClientDemo.class);

private static final String SYNC_TOPIC = "FT0-s-80000000-01-0";
private static final String ASYNC_TOPIC = "FT0-e-80010000-01-1";
private static final String BROADCAST_TOPIC = "FT0-e-80030000-01-3";
private static final String SYNC_TOPIC = "TEST-TOPIC-TCP-SYNC";
private static final String ASYNC_TOPIC = "TEST-TOPIC-TCP-ASYNC";
private static final String BROADCAST_TOPIC = "TEST-TOPIC-TCP-BROADCAST";


public static void main(String[] args) throws Exception {
Expand All @@ -53,7 +53,7 @@ public static void main(String[] args) throws Exception {
// Package rr = null;
// AccessMessage rrMessage = null;
// try {
// rr = client.rr(MessageUtils.rrMesssage("FT0-s-80000000-01-0"), 3000);
// rr = client.rr(MessageUtils.rrMesssage("TEST-TOPIC-TCP-SYNC"), 3000);
// Thread.sleep(100);
// //rrMessage = (AccessMessage) rr.getBody();
// System.err.println( "rr-reply-------------------------------------------------" + rr.toString());
Expand All @@ -72,7 +72,7 @@ public void handle(Package msg, ChannelHandlerContext ctx) {
for (int i = 0; i < 10000; i++) {
// ThreadUtil.randomSleep(0,200);
//广播消息
client.broadcast(MessageUtils.broadcastMessage("FT0-e-80030000-01-3", i), 5000);
client.broadcast(MessageUtils.broadcastMessage("TEST-TOPIC-TCP-BROADCAST", i), 5000);
//异步消息
client.publish(MessageUtils.asyncMessage(ASYNC_TOPIC, i), 5000);
}
Expand Down
2 changes: 1 addition & 1 deletion eventmesh-runtime/src/test/java/demo/SyncPubClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static void main(String[] args) throws Exception {
pubClient.heartbeat();

for (int i = 0; i < 100; i++) {
Package rr = pubClient.rr(MessageUtils.rrMesssage("FT0-s-80000000-01-0", i), 3000);
Package rr = pubClient.rr(MessageUtils.rrMesssage("TEST-TOPIC-TCP-SYNC", i), 3000);
if (rr.getBody() instanceof EventMeshMessage) {
String body = ((EventMeshMessage) rr.getBody()).getBody();
System.err.println("rrMessage: " + body + " " + "rr-reply-------------------------------------------------" + rr.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static void main(String[] args) throws Exception {
// String eventMeshIPPort = args[0];
String eventMeshIPPort = "";
// final String topic = args[1];
final String topic = "FT0-e-80010000-01-1";
final String topic = "TEST-TOPIC-HTTP-ASYNC";
if (StringUtils.isBlank(eventMeshIPPort)) {
// if has multi value, can config as: 127.0.0.1:10105;127.0.0.2:10105
eventMeshIPPort = "127.0.0.1:10105";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void main(String[] args) throws Exception {
// String eventMeshIPPort = args[0];
String eventMeshIPPort = "";
// final String topic = args[1];
final String topic = "FT0-e-80010000-01-1";
final String topic = "TEST-TOPIC-HTTP-ASYNC";
if (StringUtils.isBlank(eventMeshIPPort)) {
// if has multi value, can config as: 127.0.0.1:10105;127.0.0.2:10105
eventMeshIPPort = "127.0.0.1:10105";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
public class EventMeshTestCaseTopicSet {

// public static final String TOPIC_PRX_WQ2ClientBroadCast = "topic-broadcast-test";
public static final String TOPIC_PRX_WQ2ClientBroadCast = "FT0-e-80030001-01-3";
public static final String TOPIC_PRX_WQ2ClientBroadCast = "TEST-TOPIC-TCP-BROADCAST";

// public static final String TOPIC_PRX_SyncSubscribeTest = "topic-sync-test";
public static final String TOPIC_PRX_SyncSubscribeTest = "FT0-s-80000000-01-0";
public static final String TOPIC_PRX_SyncSubscribeTest = "TEST-TOPIC-TCP-SYNC";

// public static final String TOPIC_PRX_WQ2ClientUniCast = "topic-async-test";
public static final String TOPIC_PRX_WQ2ClientUniCast = "FT0-e-80010000-01-1";
public static final String TOPIC_PRX_WQ2ClientUniCast = "TEST-TOPIC-TCP-ASYNC";

}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void main(String[] agrs) throws Exception {
client.init();
client.heartbeat();

client.subscribe("FT0-e-80010000-01-1", SubscriptionMode.CLUSTERING, SubcriptionType.ASYNC);
client.subscribe("TEST-TOPIC-TCP-ASYNC", SubscriptionMode.CLUSTERING, SubcriptionType.ASYNC);
client.registerSubBusiHandler(handler);

client.listen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void main(String[] agrs) throws Exception {
client.init();
client.heartbeat();

client.subscribe("FT0-e-80030001-01-3", SubscriptionMode.BROADCASTING, SubcriptionType.ASYNC);
client.subscribe("TEST-TOPIC-TCP-BROADCAST", SubscriptionMode.BROADCASTING, SubcriptionType.ASYNC);
client.registerSubBusiHandler(handler);

client.listen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static void main(String[] agrs) throws Exception {
client.init();
client.heartbeat();

client.subscribe("FT0-s-80000000-01-0", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC);
client.subscribe("TEST-TOPIC-TCP-SYNC", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC);
//同步RR消息
client.registerSubBusiHandler(handler);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void main(String[] args) throws Exception {
// String eventMeshIPPort = args[0];
String eventMeshIPPort = eventMeshIp + ":" + eventMeshHttpPort;
// final String topic = args[1];
final String topic = "FT0-e-80010001-01-1";
final String topic = "TEST-TOPIC-HTTP-ASYNC";
if (StringUtils.isBlank(eventMeshIPPort)) {
// if has multi value, can config as: 127.0.0.1:10105;127.0.0.2:10105
eventMeshIPPort = "127.0.0.1:10105";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void main(String[] args) throws Exception {
// String eventMeshIPPort = args[0];
String eventMeshIPPort = eventMeshIp + ":" + eventMeshHttpPort;
// final String topic = args[1];
final String topic = "FT0-e-80010000-01-1";
final String topic = "TEST-TOPIC-TCP-ASYNC";
if (StringUtils.isBlank(eventMeshIPPort)) {
// if has multi value, can config as: 127.0.0.1:10105;127.0.0.2:10105
eventMeshIPPort = "127.0.0.1:10105";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class SubService implements InitializingBean {

final Properties properties = Utils.readPropertiesFile("application.properties");

final List<SubscriptionItem> topicList = Arrays.asList(new SubscriptionItem("FT0-e-80010001-01-1", SubscriptionMode.CLUSTERING, SubcriptionType.ASYNC));
final List<SubscriptionItem> topicList = Arrays.asList(new SubscriptionItem("TEST-TOPIC-HTTP-ASYNC", SubscriptionMode.CLUSTERING, SubcriptionType.ASYNC));
final String localIp = IPUtil.getLocalAddress();
final String localPort = properties.getProperty("server.port");
final String eventMeshIp = properties.getProperty("eventmesh.ip");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
public class EventMeshTestCaseTopicSet {

// public static final String TOPIC_PRX_WQ2ClientBroadCast = "topic-broadcast-test";
public static final String TOPIC_PRX_WQ2ClientBroadCast = "FT0-e-80030000-01-3";
public static final String TOPIC_PRX_WQ2ClientBroadCast = "TEST-TOPIC-TCP-BROADCAST";

// public static final String TOPIC_PRX_SyncSubscribeTest = "topic-sync-test";
public static final String TOPIC_PRX_SyncSubscribeTest = "FT0-s-80000000-01-0";
public static final String TOPIC_PRX_SyncSubscribeTest = "TEST-TOPIC-TCP-SYNC";

// public static final String TOPIC_PRX_WQ2ClientUniCast = "topic-async-test";
public static final String TOPIC_PRX_WQ2ClientUniCast = "FT0-e-80010000-01-1";
public static final String TOPIC_PRX_WQ2ClientUniCast = "TEST-TOPIC-TCP-ASYNC";

}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static void main(String[] agrs) throws Exception {
client.init();
client.heartbeat();

client.subscribe("FT0-e-80010000-01-1", SubscriptionMode.CLUSTERING, SubcriptionType.ASYNC);
client.subscribe("TEST-TOPIC-TCP-ASYNC", SubscriptionMode.CLUSTERING, SubcriptionType.ASYNC);
client.registerSubBusiHandler(handler);

client.listen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static void main(String[] agrs) throws Exception {
client.init();
client.heartbeat();

client.subscribe("FT0-e-80030000-01-3", SubscriptionMode.BROADCASTING, SubcriptionType.ASYNC);
client.subscribe("TEST-TOPIC-TCP-BROADCAST", SubscriptionMode.BROADCASTING, SubcriptionType.ASYNC);
client.registerSubBusiHandler(handler);

client.listen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void main(String[] agrs) throws Exception {
client.init();
client.heartbeat();

client.subscribe("FT0-s-80000000-01-0", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC);
client.subscribe("TEST-TOPIC-TCP-SYNC", SubscriptionMode.CLUSTERING, SubcriptionType.SYNC);
//同步RR消息
client.registerSubBusiHandler(handler);

Expand Down

0 comments on commit 191eff2

Please sign in to comment.