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/01/28 08:16:07 UTC

[GitHub] [rocketmq-spring] GeorgeLyu1992 opened a new issue #425: batch sync produce instead of sync produce got response code 13

GeorgeLyu1992 opened a new issue #425:
URL: https://github.com/apache/rocketmq-spring/issues/425


   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   - What did you do (The steps to reproduce)?
   
    When I produce a single message using 
   org.apache.rocketmq.spring.core.RocketMQTemplate#syncSend(java.lang.String, org.springframework.messaging.Message<?>)
    to a topic, the message was produced properly,
   
   but when I used this method instead with a list size of 1 (same message):
   org.apache.rocketmq.spring.core.RocketMQTemplate#syncSend(java.lang.String, java.util.Collection<T>, long)
   I got a exception:
   org.apache.rocketmq.client.exception.MQBrokerException: CODE: 13  DESC: the message is illegal, maybe msg body or properties length not matched. msg body length limit 128k, msg properties length limit 32k. BROKER: 192.200.3.178:30911
   For more information, please visit the url, http://rocketmq.apache.org/docs/faq/
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl.processSendResponse(MQClientAPIImpl.java:666)
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl.sendMessageSync(MQClientAPIImpl.java:505)
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl.sendMessage(MQClientAPIImpl.java:487)
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl.sendMessage(MQClientAPIImpl.java:431)
   	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendKernelImpl(DefaultMQProducerImpl.java:877)
   	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendDefaultImpl(DefaultMQProducerImpl.java:607)
   	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1398)
   	at org.apache.rocketmq.client.producer.DefaultMQProducer.send(DefaultMQProducer.java:910)
   	at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:526)
   	at com.whhim.jpushservice.server.service.JpushService.send(JpushService.java:47)
   	at com.whhim.jpushservice.server.controller.JpushController.send(JpushController.java:42)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
   	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
   	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
   	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879)
   	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
   	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
   	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
   	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
   	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
   	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
   	at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
   	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
   	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:109)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
   	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
   	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
   	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
   	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
   	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
   	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
   	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
   	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
   	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
   	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
   	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   	at java.lang.Thread.run(Thread.java:748)
   
   - What did you expect to see?
   
   batch produce successfully same as single produce
   
   - What did you see instead?
   
   exception
   
   2. Please tell us about your environment:
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
   Is there something wrong the way I do or is it a bug? Please let me know.
   


-- 
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] zhangjidi2016 commented on issue #425: batch sync produce instead of sync produce got response code 13

Posted by GitBox <gi...@apache.org>.
zhangjidi2016 commented on issue #425:
URL: https://github.com/apache/rocketmq-spring/issues/425#issuecomment-1033243812


   @GeorgeLyu1992  What are rocketmq-spring and rocketmq versions are you using?I tested it locally and there was no problem like yours.My environment is rocketmq:4.9.2 and rocketmq-spring:2.2.2-SNAPSHOT.


-- 
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 #425: batch sync produce instead of sync produce got response code 13

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #425:
URL: https://github.com/apache/rocketmq-spring/issues/425#issuecomment-1031248755


   Hi, @GeorgeLyu1992  Could you submit a PR to solve this issue?


-- 
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] GeorgeLyu1992 commented on issue #425: batch sync produce instead of sync produce got response code 13

Posted by GitBox <gi...@apache.org>.
GeorgeLyu1992 commented on issue #425:
URL: https://github.com/apache/rocketmq-spring/issues/425#issuecomment-1023985507


   actual test data i'm using :
   {
           "platforms":[
               "ANDROID", "IOS"
           ],
           "aliases":[
               "SH1002"
           ],
           "title":"test title111",
           "message":"test message111",
           "sendToJpush":false
       }


-- 
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] GeorgeLyu1992 commented on issue #425: batch sync produce instead of sync produce got response code 13

Posted by GitBox <gi...@apache.org>.
GeorgeLyu1992 commented on issue #425:
URL: https://github.com/apache/rocketmq-spring/issues/425#issuecomment-1023983901


   this is my message and payload:
   MessageBuilder.withPayload(new QueueItem(pushParam))
   //                            .setHeader(RocketMQHeaders.KEYS, "test-key-111")
                               .setHeader(MessageHeaders.CONTENT_TYPE, MimeTypeUtils.APPLICATION_JSON_VALUE)
                               .build());
   
   
   @Data
   @NoArgsConstructor
   public class QueueItem {
   
       /**
        * 调用类型.
        * 0-发送推送;
        * 1-删除别名regIds;
        */
       private Integer type;
   
       /**
        * type == 0 时 non-null
        */
       private PushParam pushParam;
   
       /**
        * type == 1 时 non-null
        */
       private String alias;
   
       public QueueItem(PushParam pushParam) {
           this.type = 0;
           this.pushParam = pushParam;
       }
   
       public QueueItem(String alias) {
           this.type = 1;
           this.alias = alias;
       }
   }
   
   
   
   
   @Data
   public class PushParam {
   
       /**
        * 推送平台
        */
       private List<Platform> platforms;
   
       /**
        * 是否广播
        */
       private boolean broadcast = false;
   
       /**
        * 推送目标别名,一个别名对应一个登录身份,  ***不超过1000***
        */
       private List<String> aliases;
   
       /**
        * 推送标签名(广播、别名、标签三选一)
        */
       private List<String> tags;
   
       private String title;
   
       private String message;
   
       /**
        * 是否保存jpush msg_id 运营消息用
        */
       private boolean saveJpushId = false;
       /**
        * 运营消息用
        */
       private Integer messageId;
   
       /**
        * 是否发送到极光,测试环境根据需要开关
        */
       private boolean sendToJpush;
   
       /**
        *	扩展字段
        *  这里自定义 JSON 格式的 Key / Value 信息,以供业务使用。
        *  可以把跳转页面链接信息从这里传入,客户端收到后自行处理
        */
       private Map<String, String> extras;
   
       public enum Platform {
           ANDROID, IOS
       }
   }
   
   


-- 
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] GeorgeLyu1992 commented on issue #425: batch sync produce instead of sync produce got response code 13

Posted by GitBox <gi...@apache.org>.
GeorgeLyu1992 commented on issue #425:
URL: https://github.com/apache/rocketmq-spring/issues/425#issuecomment-1035866405


   > 
   mine is : rocketmq:4.9.1 and rocketmq-spring:2.2.1-SNAPSHOT
   


-- 
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