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:18:05 UTC

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

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