rabbitmq-stream-dotnet-client icon indicating copy to clipboard operation
rabbitmq-stream-dotnet-client copied to clipboard

Add Compression Codecs for sub-entry

Open Gsantomaggio opened this issue 3 years ago • 6 comments

By default client Support None and GZIP. We need to provide the examples for:

Snappy = 2,
Lz4 = 3,
Zstd = 4,

as external codec to be compatible with:

Gsantomaggio avatar Jan 21 '22 13:01 Gsantomaggio

Lz4 Example

Gsantomaggio avatar Jan 21 '22 13:01 Gsantomaggio

Hi!

I looked at an example, but there was a question. Dependencies for new codecs (wrappers over calls) should be included in the current project or go independently - a separate project including the main one or its part with interfaces? As far as I understand the rabbitmq-dotnet-client project follows the principle of the minimum number of dependencies

0UserName avatar Feb 18 '22 10:02 0UserName

Dependencies for new codecs (wrappers over calls) should be included in the current project or go independently

We don't want to add external dependencies. So the idea is to write the example, then it is up to the user to decide to add the dependency.

So you write your codec then add it with:

 StreamCompressionCodecs.RegisterCodec<StreamXXXCodec>(CompressionType.XXX);

Gsantomaggio avatar Feb 18 '22 10:02 Gsantomaggio

So the idea is to write the example, then it is up to the user to decide to add the dependency.

That is, no need to integrate the codec into the library, but only to prepare examples. Need something like a documentation page (section in README.md)?

0UserName avatar Feb 18 '22 10:02 0UserName

the idea is not to integrate the codec into the library, but only to prepare examples?

yes, maybe create a directory examples and put the code with the documentation.

Gsantomaggio avatar Feb 18 '22 10:02 Gsantomaggio

Example for lz4:https://github.com/rabbitmq/rabbitmq-stream-dotnet-client/blob/main/docs/Documentation/AddCustomCodec.cs

Gsantomaggio avatar Jul 29 '22 14:07 Gsantomaggio