Skip to content
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

Make EventData constructor public #252

Closed
roegerle opened this issue Nov 8, 2023 · 5 comments
Closed

Make EventData constructor public #252

roegerle opened this issue Nov 8, 2023 · 5 comments

Comments

@roegerle
Copy link

roegerle commented Nov 8, 2023

Can we get the package private constructor of EventData public instead? Maybe I'm missing something but I don't see a way to set the mime type to anything of than application/json and application/octet-stream.

@cdevarenne
Copy link

Thank you for asking @roegerle, custom mime types are not supported at this time.

@cdevarenne cdevarenne closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
@cdevarenne
Copy link

cdevarenne commented Nov 9, 2023 via email

@cdevarenne cdevarenne reopened this Nov 9, 2023
@roegerle
Copy link
Author

roegerle commented Nov 9, 2023

Yes. I removed that comment though after looking at the api and the commit history of the project. I missed this method...

EventDataBuilder | json​(java.lang.String eventType, byte[] eventData)

Which I haven't tried but I suspect would suit my needs just fine. My problem is I have tons of custom serialization code in Gson and don't want to mess around with Jackson.

@YoEight
Copy link
Member

YoEight commented Nov 9, 2023

@roegerle That is expected. The UI will only display payload in a json format. Same with user defined projections, those will only work if the events they are dealing with have json payload. You can use any other format, the database doesn't care but all the built-ins visualization tools and the projections I talked about won't be able to process the payload.

@YoEight
Copy link
Member

YoEight commented Nov 9, 2023

Which I haven't tried but I suspect would suit my needs just fine. My problem is I have tons of custom serialization code in Gson and don't want to mess around with Jackson.

Rest assured you won't have to. Use the binary smart constructor/method and store your gson-format events stress-free. it's for usecases like that the binary format or application/octet-stream is meant for :)

@YoEight YoEight closed this as completed Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants