AWS SQS 的最佳字符串消息格式是什么?
What is the best string message format for AWS SQS?
也许这是一个愚蠢的问题,但刚刚开始在 Aws Sqs 上工作;我想向队列发送消息(正常 queue/not FIFO),我有一个 customerDto,它有名字、姓氏和 balanceAmount。我想在一条消息中发送这些信息,然后用另一种方法接收该消息。
我可以用哪种格式发送邮件?只需将它们与自定义符号(如“+”)一起发送,然后将“+”解析为 space 字符?..或者哪种方式适合侦听器方法正确解析?
public class CustomerDto {
@ApiModelProperty(value = "Name of the user", required = true)
private String firstName;
@ApiModelProperty(value = "Last name of the user", required = true)
private String lastName;
@ApiModelProperty(value = "Balance", required = true)
private Long accountBalance;
}
我认为最常见的事情是将数据序列化为 JSON 字符串。它很简单,每种语言都有处理它的方法。
也许这是一个愚蠢的问题,但刚刚开始在 Aws Sqs 上工作;我想向队列发送消息(正常 queue/not FIFO),我有一个 customerDto,它有名字、姓氏和 balanceAmount。我想在一条消息中发送这些信息,然后用另一种方法接收该消息。
我可以用哪种格式发送邮件?只需将它们与自定义符号(如“+”)一起发送,然后将“+”解析为 space 字符?..或者哪种方式适合侦听器方法正确解析?
public class CustomerDto {
@ApiModelProperty(value = "Name of the user", required = true)
private String firstName;
@ApiModelProperty(value = "Last name of the user", required = true)
private String lastName;
@ApiModelProperty(value = "Balance", required = true)
private Long accountBalance;
}
我认为最常见的事情是将数据序列化为 JSON 字符串。它很简单,每种语言都有处理它的方法。