hyhyf commented on code in PR #706:
URL: https://github.com/apache/skywalking-java/pull/706#discussion_r1694215993


##########
test/plugin/scenarios/spring-jms-5.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/spring/jms/controller/CaseController.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.testcase.spring.jms.controller;
+
+import lombok.extern.log4j.Log4j2;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.jms.core.JmsMessagingTemplate;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.jms.Message;
+import javax.jms.TextMessage;
+
+@RestController
+@RequestMapping("/case")
+@Log4j2
+public class CaseController {
+
+    private static final String SUCCESS = "Success";
+
+    @Autowired
+    private JmsMessagingTemplate jmsMessagingTemplate;
+
+    @RequestMapping("/spring-jms-scenario")
+    @ResponseBody
+    public String testcase() {
+        jmsMessagingTemplate.convertAndSend("test", "hello world");
+        return SUCCESS;
+    }
+
+    @RequestMapping("/healthCheck")
+    @ResponseBody
+    public String healthCheck() {
+        return SUCCESS;
+    }
+
+    @JmsListener(destination = "test", concurrency = "10")
+    public void onMessageReceived(Message message) throws Exception {
+        TextMessage textMessage = (TextMessage) message;
+        log.info("received normal message: " + textMessage.getText());
+    }

Review Comment:
   i used apm-activemq-5.x-plugin in test scenario, i don't know how the 
consumer traffic count it, i set JMS entry span component is spring.async



##########
test/plugin/scenarios/spring-jms-5.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/spring/jms/controller/CaseController.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.testcase.spring.jms.controller;
+
+import lombok.extern.log4j.Log4j2;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.jms.core.JmsMessagingTemplate;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.jms.Message;
+import javax.jms.TextMessage;
+
+@RestController
+@RequestMapping("/case")
+@Log4j2
+public class CaseController {
+
+    private static final String SUCCESS = "Success";
+
+    @Autowired
+    private JmsMessagingTemplate jmsMessagingTemplate;
+
+    @RequestMapping("/spring-jms-scenario")
+    @ResponseBody
+    public String testcase() {
+        jmsMessagingTemplate.convertAndSend("test", "hello world");
+        return SUCCESS;
+    }
+
+    @RequestMapping("/healthCheck")
+    @ResponseBody
+    public String healthCheck() {
+        return SUCCESS;
+    }
+
+    @JmsListener(destination = "test", concurrency = "10")
+    public void onMessageReceived(Message message) throws Exception {
+        TextMessage textMessage = (TextMessage) message;
+        log.info("received normal message: " + textMessage.getText());
+    }

Review Comment:
   i used apm-activemq-5.x-plugin in test scenario, i don't know how the 
consumer traffic count it, i set JMS entry span component is spring.async.



-- 
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: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to