mtesseract / nakadi-client

Haskell Client Library for the Nakadi Event Broker
Other
13 stars 9 forks source link

Separate subscription types #109

Closed mtesseract closed 6 years ago

mtesseract commented 6 years ago

closes #103

Introduces a new type SubscriptionRequest. This reorganizes and simplifies the type Subscription, most importantly the Subscription ID becomes mandatory.

Also, I have simplified (for the user) the handling of the subscription position in these datatypes. In JSON the subcription position is given by two distinct object fields: read_from and cursors. On the sid of the Haskell API this is now merged in a new ADT SubscriptionPosition. This is a much better modelling of the Nakadi API in my opinion.

Furthermore, a newtype has been added: ConsumerGroup.

etorreborre commented 6 years ago

I agree that's a much better modelling of the endpoint. 👍

mtesseract commented 6 years ago

Thank you very much for the review! Will check the quasi quoting before merging.

mtesseract commented 6 years ago

Fine to merge, right?

etorreborre commented 6 years ago

Beautiful.