sdk-java
sdk-java copied to clipboard
NATS bindings
This addresses issue #413 - I understand it will take a fair amount to review and there may be plenty of feedback. I tend to squash commits to retain only a single commit in a PR so please let me know if this is not desirable.
Alternatively it might be more worthwhile for my opensource project (FeatureHub) to maintain this binding outside the lifecycle of the sdk-java and just have the sdk-java point to it, as we are active users of NATS.
In the meantime as I need this, I have released these bindings under FeatureHub, along with AWS Kinesis and Google PubSub bindings. https://github.com/featurehub-io/featurehub-cloudevents
Hi @rvowles, thanks for the PR!
I'm slowly reviewing the PR, it might take a while since it is big.
....?
A non-functional change to consider, @pierDipi I'd like your comment here as well.
While I've been working offline on some MQTT bindings what stuck me was that the way our code is organized wasn't very consistent, by that I mean all the different format implementations live under
My proposal is to start housing the different bindings under a /bindings folder and subdivide that by transport and then by implementation.
In my MQTT work I've got this structure..
Can we consider moving this under bindings/nats ??
Another proposal ...
I'm a massive fan of encapsulation and 'implementation hiding' ... by placing all of the implementing classes in their own package they have essentially become publicly accessible.
Given that the 'MessageFactory' represents the programatic interface to the module that should be the only thing implementors need to worry about and see documentation about IMHO.
As such my proposal would be to move all of the 'impl' classes into the main package and change their visibility to package-private.
@JemDay I agree with you on both fronts, I don't like "impl" packages as well as the flatten vs deep structure of formats and bindings
Given there seems no intention to integrate this MR, and I have already released it elsewhere (along with Kinesis and Google PubSub), I will close this.