-
Notifications
You must be signed in to change notification settings - Fork 17
IllegalArgumentException when using --mode=ref #2
Comments
The
So, if there is some So, share, please, which binder properties you have for the |
Thanks for looking into this, @artembilan. I'm using rabbit-app with all the default configs. The latest rabbit-apps can be found here. |
M-m-m. That doesn't help.
And voila! I ended up with the same
That must be fixed, but on the SCSt side. The |
This is a known issue with the We added code to SI to permit suppressing the propagation of an inbound contentType to the outbound side; this looks like another flavor of that. It seems to me that the "canConvert" test should be based on the payload type, not the contentType header (or fall back to the payload type if it finds the contentType is not convertible). @mbogoevici ?? |
??? It is
|
I was just pointing out the flaw in the converter; I wasn't commenting on the origin of the contentType that was used for the conversion. That's what I meant by "another flavor". |
As per our IPM discussion, this is a SCSt regression. Looks like we have lost the ability to do simple Object->String conversions. My suggestion would be to: a) as per @garyrussell 's suggestion, throw an exception when conversion fails instead of returning null b) Include a unidirectional ObjectToString converter that can handle any non-String to outbound String (via payload.toString()) - it would be unidirectional, because there's no generic way to convert an inbound String to an POJO. cc/@artembilan |
Basically this is what I think that we're missing: https://github.com/spring-cloud/spring-cloud-stream/blob/1.0.x/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/converter/PojoToStringMessageConverter.java Possibly a more enhanced version that can use encoding. |
The fix in SCSt has been merged. |
Fixes spring-attic#2 Add a `"spring.cloud.stream.bindings.output.contentType=text/plain"` property to the `file.consumer.mode = ref` test-case to be sure that the fix with `MessageConvert`s in the SCSt works well
Fixes #2 Add a `"spring.cloud.stream.bindings.output.contentType=text/plain"` property to the `file.consumer.mode = ref` test-case to be sure that the fix with `MessageConvert`s in the SCSt works well
As a user, I have a stream that includes
file
source with--mode=ref
and on every new file event, I'm getting anIllegalArgumentException
. This is happening on bothAvogadro-GA
(1.1.0.GA) andAvogadro-SR1
(1.1.1.GA) releases. This, however, works with1.0.2.GA
release, though.stream:
error:
The text was updated successfully, but these errors were encountered: