Code Monkey home page Code Monkey logo

rocklib.messaging's People

Contributors

aatchison14 avatar austin0150 avatar aydinakcasu avatar bencrim avatar bfriesen avatar cdraper033 avatar derikwhittaker avatar dtarjeft avatar dvdspck avatar eslutz avatar jakebeebe avatar jasonbock avatar justinmoss avatar kristycurrier avatar mattsonlyattack avatar mjeaton avatar motionsuggests avatar neilschiefer avatar nickstrupat avatar p-moberg avatar peteraritchie avatar pjwilliams2 avatar qljcherry avatar tasadar2 avatar tommcdo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rocklib.messaging's Issues

Support specversions 1.0.1 and 1.0.2

CloudEvents is currently at version 1.0.2: https://github.com/cloudevents/spec.

Currently, the library will only validate events that specify 1.0 and will error for any other specification version.

Spec versions 1.0.1 and 1.0.2 are backwards compatible, so it would be great if the library could either support these or relax its validation to treat them as 1.0.

RockLib.Messaging.Kafka Dependency [Confluent.Kafka 1.8.2]

Is there a reason that we are using an older dependency of Confluent.Kafka (1.8.2). Some of my teams were being advised to use Confluent.Kafka natively instead of RockLib and wanted to get a better understanding if there was any specific reason we are still using 1.8.2.

Reloading config disposes of DI sqs client

Problem
Whenever the configuration events occur, the reloading config creates a new service and disposes of the original. Coupled with the fact that disposing some services, disposes of their dependencies, regardless of origin, this can result in disposal of the base dependency, needed for the newly created service.

Example:

builder.Services.Configure<SQSSenderOptions>(QueueDefaults.Name, builder.Configuration.GetSection("Queue:Event"));
builder.Services.TryAddAWSService<IAmazonSQS>();
builder.Services.AddSQSSender(QueueDefaults.Name);

With this example, the base AmazonSQSClient will be disposed upon the first configuration event received.



This can break singleton and scoped queue operations, as it will dispose of the amazon client for that particular scope, and future operations will not function.

Workaround
Do not use the reloading config.

builder.Services.AddSQSSender(QueueDefaults.Name, reloadOnChange: false);

Note that this workaround does not account for any cases in which a sender service is disposed of, as it will also result in the disposal of the base amazon client.

Possible solutions

  • The library can properly support DI scoping.
  • The services should never dispose anything they did not explicitly instantiate themselves, unless they are told to do so.

Not instantiating KafkaSender object correctly

Using AddKafkaSender extension function from KafkaExtensions to instantiate the KafkaSender doesn't read the SchemaId property from the configureOptions. This leads to a problem of not setting the SchemaId value to the KafkaSender instance.

Dispose of SemaphoreSlim in ReceiverMessage

KafakaReceiverMessage implements ReceiverMessage, and ReceiverMessage has an SemaphoreSlim member. SemaphoreSlim implements IDisposable, but ReceiverMessage does not implement IDisposable so the SemaphoreSlim does not get disposed. This leaves a potential performance issue that could lead to exceptions or necessary garbage collection. cc @JustinMoss

Originally posted by @peteraritchie in #120 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.