forcedotcom / EMP-Connector

A simplified cometd connector for Enterprise Messaging Platform
BSD 3-Clause "New" or "Revised" License
185 stars 243 forks source link

Is it possible to swap the parser/deserializer? #9

Closed stanlemon closed 6 years ago

stanlemon commented 7 years ago

I've run into some issues where the JSON parser has issues with nested objects, is it possible to swap out the parser that cometd is using in this abstraction? If not, it might make sense to allow the Consumer to take a String and use message.getJSON() instead to provide better handling there. Let me know if you want to go the string route, I'm happy to write a PR for that.

sfdc-hhildebrand commented 7 years ago

I will look at it and see what I can do.

pbn-sfdc commented 6 years ago

Consumers can get String version of the message and parse it themselves. In future, we'll add support for payload format so consumers will be able to read the message based on an event's schema.