-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add multi-topic convenience method #359
Conversation
8dde0df
to
f6a80af
Compare
Codecov Report
@@ Coverage Diff @@
## master #359 +/- ##
==========================================
+ Coverage 91.29% 91.34% +0.04%
==========================================
Files 62 62
Lines 1447 1455 +8
Branches 54 54
==========================================
+ Hits 1321 1329 +8
Misses 126 126
Continue to review full report at Codecov.
|
Thanks @keirlawson! Is there anything that prevents you from creating a coproduct of the events from the different topics? If you define a union |
Hey @vlovgr , I had at least a use case where this was still useful, since that was some information encoded in the topic names that had to be propagated the Vulcan codecs. I wrote my own solution, which is quite a lot uglier than this PR, judge by yourself:
|
@vlovgr happy to hear there's an easier way :-) I just tried using |
hey @vlovgr :) I just wanted to confirm that that trick doesn't work anymore with the latest fs2-kafka / vulcan |
Yes, I believe that stopped working with #282. I've created a pull request (fd4s/vulcan#191) to change the union decoding to also accept schemas in the union (in addition to the union schema), which should fix the issue. Sounds like the addition in this pull request should still be useful in special circumstances. |
Hey @SystemFw, I'm quite curious about your use case, can you share any more details on why you need to do this? (feel free to DM me if you don't want to talk about it publicly) |
Is there any reason why this never got merged? |
I took a quick look now, and I think this assumption about |
does the uglier solution I posted above suffer from the same limitation? |
No, that solution looks alright to me. 👍 |
I'll see if I can PR that then |
Hey @SystemFw, I can't find your PR for that. Do you feel this is still needed after +3 years? Shall we re-discuss it for 3.x? |
The equivalent of
Deserializer.topic
for use with Vulcan codecs.I found myself having to write this when creating a consumer that read from multiple topics, hopefully it might be useful to others.