v1.0.0-rc.6
The client is distributed via NuGet.
Breaking changes
This version contains a few braking changes; please read the following documentation.
-
Why so many changes?
The idea is to give a similar JavaStream client user experience.
-
Classes concepts:
Class Description How to get Note RawProducer Low-Level producer system.CreateRawProducer(new RawProducerConfig("stream")
RawSuperStreamProducer Low Level Super Stream Producer `system.RawCreateSuperStreamProducer(new RawSuperStreamProducerConfig("superStream")` Producer Hight Level producer. Producer.Create(new ProducerConfig(system, stream))
-Handle RawProducer
andRawSuperStreamProducer
- Auto reconnect
- Auto publishing id
- Confirm Messages with errors (timeout..etc)RawConsumer Low Level consumer system.CreateRawConsumer(newRawConsumerConfig("stream")
RawSuperStreamConsumer Low Level Super Stream Consumer `system.RawCreateSuperStreamConsumer(new RawSuperStreamConsumerConfig("superStream")` Consumer Hight Level Consumer. Consumer.Create(new ConsumerConfig(system, stream))
-Handle RawConsumer and RawCreateSuperStreamConsumer
- Auto reconnect -
Class mapping from version:
v1.0.0-rc.5
tov1.0.0-rc.6
<= v1.0.0-rc.5
>= v1.0.0-rc.6
Producer
RawProducer
Consumer
RawConsumer
ReliableProducer
Producer
ReliableConsumer
Consumer
Update example:
<=v1.0.0-rc.5 from |
>= v1.0.0-rc.6 to |
---|---|
await system.CreateProducer(new ProducerConfig() {stream = "mystream"}) |
`await system.CreateRawProducer(new |
RawProducerConfig(streamName))` | |
await system.CreateConsumer(new ConsumerConfig() {stream = "mystream"}) |
`await system.CreateRawConsumer(new |
RawConsumerConfig(streamName))` | |
await ReliableProducer.CreateReliableProducer(new ReliableProducerConfig() {..} |
`await Producer.Create(new |
ProducerConfig(system,stream)` | |
await ReliableConsumer.CreateReliableConsumer(new ReliableConsumerConfig() {..} |
`await Consumer.Create(new |
ConsumerConfig(system,stream)` |
-
Configuration changes:
All the
*Config
classes contain a constructor with the mandatory fields. So it is easier for the user understand how to use the class.For example:
new RawProducerConfig(stream)
<-- the stream is mandatory -
Exceptions
All the validations are now under the
ArgumentException
Exception
For example:
new RawProducerConfig("")
<-- raisesArgumentException
-
Questions:
Q: Why the
Producer
/Consumer
classes are not provided directly bysystem
?
A: We'd like to leave the low-level classes as easy as possible. A user can implement a similarProducer
starting fromRawProducer
andRawSuperStreamProducer
as we did.Q: Which classes should I use?
A: We suggest usingProducer
/Consumer
classesQ: When to use
RawProducer
?
A: When you want a low-level producer and you what to handle the reconnections/confirmation differently. Note:RawProducer
could be faster than
theProducer
under certain situations since it doesn't have to handle the sent/received messages.
Release notes
Enhancements
- Add Single Active Consumer by @Gsantomaggio in #152
- Add SuperStream for ReliableProducer by @Gsantomaggio in #172
- Add Super Stream Consumer by @Gsantomaggio in #174
- Change definition of MaxLengthBytes stream specification - #165 by @PaoloLaurenti in #166
Bug Fix
- Fix occurrences of sync-over-async by @Hawxy in #164
- Fix Reconnect ReliableProducer/ ReliableConsumer in case leader is down by @Gsantomaggio in #163
- Add client cert example to readme by @ricsiLT in #169
- AMQP Parser: Change the Read and Write for Strings by @Gsantomaggio in #176
Breaking changes
- Refactor Classes names by @Gsantomaggio in #177
New Contributors
- @Hawxy made their first contribution in #164
- @PaoloLaurenti made their first contribution in #166
Full Changelog: v1.0.0-rc.5...v1.0.0-rc.6