How to convert a simple method that returns the List<String> into Multi<String> based on Smallrye Mutiny? #962
Replies: 4 comments 4 replies
-
Your code is using blocking I/O ( |
Beta Was this translation helpful? Give feedback.
-
@jponge Thanks a lot for the response. Just to make it Reactive, let's forget the |
Beta Was this translation helpful? Give feedback.
-
@jponge Thanks a lot for your response. Based on your suggestion I changed my method to something like this, can you please once have a look and suggest if this is a good approach? Because even here I feel we need to wait for all the elements in the List to complete before emitting the response.
|
Beta Was this translation helpful? Give feedback.
-
@jponge Thanks a lot again for the response. I am a bit unable to understand completely what you are referring to in this comment:
If possible can you please provide some sort of example? Thanks a lot in advance :) |
Beta Was this translation helpful? Give feedback.
-
I am developing an application that reads the XML file and creates the Hash ID based on the details present in XML. As of now, everything is working perfectly, and able to get the
List<String>
.I would like to convert this application into
Reactive Streams
using theSmallrye Mutiny
so I went through some of the documentation but did not understand clearly how to convert this application intoReactive Streams
where I do not have to wait for the completion of all XML file to return theList<String>
. Rather I can start returning theMulti<String>
as and when the its generated.Following is the simple XML that I am reading using SAX Parser to create the Hash ID:
Following is the Main application which will make call to
SaxHandler
:Following is the
SaxHandler
which will read the XML and create HashIDs:Following is the
Test
:Can someone please guide me to some example or provide some idea on how to convert this application into
SmallRye Mutinty Multi<String>
based application?Beta Was this translation helpful? Give feedback.
All reactions