-
Notifications
You must be signed in to change notification settings - Fork 97
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
V3 binder messages not compatible with v4 version binder #192
Comments
This may be related: |
OK. I cannot reproduce it in my own test.
As you see that header
Will look into your application now... |
Well, I'm not sure what we are talking here about.
and this is what I see in debug:
So, what do I miss about that header propagation? |
Are you running the applications from 2 different branches at the same time? You should receive the messages from application that is run on binder v3 in application that is running binder v4. |
Oh! No. That is not going to work. We probably can come up with some re-mapper processor, but it is not clear where in your architecture you can place it... |
That was not expected, I remember migrating from V2 to V3 was easy and fully compatible. Do you know if it is possible to fix the locking issue in V3 binder? #190 |
It was easy because there was no any crucial dependency upgrades. Mostly just Java version migration. Fortunately the cat is not out of the bag yet as you said that don't have GA version released. Unfortunately we cannot fix that problem in previous version since the real problem is out of our control in that DynamoDB Lock Client library. You can use, though, some other |
That is interesting, do you have any example of how to use 3rd party lock registry with kinesis? |
Just declare a respective bean in your configuration.
The
|
So, as I promised I came up with something like
This confirms that messages produced from v3 are properly deserialized in v4, while new format is also there. The v3 branch has this:
Which also says us that new format is received, but it cannot be properly deserialized. Not sure what else we can do, so I'm going to push that fix to let you to test on yourself. Some not re. your app: I had to modify your
In the bottom section and remove |
Fixed via: 56d6212 |
The Thank you for all your hard testing of this new version! Let us know if you got more issues! We are going to release GA next week. |
Thanks @artembilan I'm trying with JdbcLockRegistry for now, and will see how it goes, anyway I think it is really nice that you can support the previous format. |
This is just a thought, maybe it would be nice to configure on the stream/binder level to use legacy format so produced messages can be read by older clients. |
Yes. That is also possible since we have already that API to support them. |
This depends on the project but in microservice architecture, it will be very hard to update the binder without synchronous redeployment of all microservices, which is not always possible. I'm not sure why a new format is needed, but I think it is better to stick to the old format if possible or add support for the new formats to old binders too, so it may support both formats transparent for the client. Same stream may be read by multiple services... |
Sure! |
Fixes: #192 * Expose `spring.cloud.stream.kinesis.binder.legacy-embedded-headers-format` configuration property (`false` by default) * Add logic into a `LegacyEmbeddedHeadersSupportBytesMessageMapper` to serialize headers via `EmbeddedHeaderUtils` when `legacyEmbeddedHeadersFormat == true` * Use `LegacyEmbeddedHeadersSupportBytesMessageMapper` on producer endpoints as well * Change `KinesisBinderObservationTests` configuration to verify legacy headers support
Now all good.
This way produced messages from v4 are going to be serialized via old format and v3 can receive them. |
Sounds good, thank you! |
That's correct. Since we really have all the required info in that |
Between 3.0.0 and 4.0.0
Describe the bug
Messages sent using v3 binder version are not compatible with v4 version.
To Reproduce
Expected behavior
Both running instances should receive messages from each other.
Actual behavior
messages did not deserialize properly
in the app with V4 binder log I see:
Received message: ���contentType �"application/json" spring.cloud.function.definition �"asd"Message: 46
Received message: Message: 25
The first message is from V3 binder, and second is from V4
The text was updated successfully, but these errors were encountered: