sdk-java icon indicating copy to clipboard operation
sdk-java copied to clipboard

NATS bindings

Open rvowles opened this issue 3 years ago • 3 comments
trafficstars

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.

rvowles avatar Sep 13 '22 09:09 rvowles

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.

rvowles avatar Sep 16 '22 02:09 rvowles

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

rvowles avatar Oct 01 '22 21:10 rvowles

Hi @rvowles, thanks for the PR!

I'm slowly reviewing the PR, it might take a while since it is big.

pierDipi avatar Oct 04 '22 07:10 pierDipi

....?

rvowles avatar Dec 10 '22 04:12 rvowles

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 /formats but everything else just floats under the root.

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..

/bindings/mqtt/paho /bindings/mqtt/hivemq

Can we consider moving this under bindings/nats ??

JemDay avatar Jan 12 '23 15:01 JemDay

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 avatar Jan 12 '23 16:01 JemDay

@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

pierDipi avatar Jan 13 '23 10:01 pierDipi

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.

rvowles avatar Jan 17 '23 05:01 rvowles