rabbitmq 界面增加消息
1. 消息体为字符串
## 1. 消息体为字符串类型
在queue中直接进行push消息即可

2. 消息体为java对象序列化
// 需要对对象进行序列化输出后base64加密
Object obj = new Object;
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(obj);
System.out.println(Base64Encoder.encode(bos.toByteArray()));
//页面 Properties -> content_type : application/x-java-serialized-object
页面 Properties中需设置文本类型为java序列化类型 -> content_type : application/x-java-serialized-object
encoding 编码为base64


浙公网安备 33010602011771号