-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caused by: com.alibaba.fastjson.JSONException: TODO : T #12
Comments
疑似默认必须是JSON类型的 如果不是JSON类型的,得自定义,参考https://docs.spring.io/spring-cloud-stream/reference/spring-cloud-stream/overview-user-defined-message-converters.html |
疑似消息格式化错误尝试n次后不会被放置到死信?有待确认。比如默认的是json converter,而发送方发了一段text文本。 |
JsonMessageConverter: As the name suggests it supports conversion of the payload of the Message to/from POJO for cases when contentType is application/json (DEFAULT).
ByteArrayMessageConverter: Supports conversion of the payload of the Message from byte[] to byte[] for cases when contentType is application/octet-stream. It is essentially a pass through and exists primarily for backward compatibility.
ObjectStringMessageConverter: Supports conversion of any type to a String when contentType is text/plain. It invokes Object’s toString() method or, if the payload is byte[], a new String(byte[]). 奇怪,按说官方文档提到直接支持文本类型,https://docs.spring.io/spring-cloud-stream/reference/spring-cloud-stream/provided-messageconverters.html, text/plain对应ObjectStringMessageConverter 为什么没有起作用呢? |
@Bean
public MessageConverter customMessageConverter() {
return new org.springframework.cloud.stream.converter.ObjectStringMessageConverter();
} 确实,需要声明customMessageConverter |
经过测试受双重因素影响 //10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h
private final int[] popDelayLevel = new int[] {10, 30, 60, 120, 180, 240, 300, 360, 420, 480, 540, 600, 1200, 1800, 3600, 7200}; 没有被正常消费的消息,首先会进入%RETRY%your_consumer_group,接着按照 |
The text was updated successfully, but these errors were encountered: