Code Monkey home page Code Monkey logo

greenpipes's Introduction

greenpipes's People

Contributors

alexeyzimarev avatar drusellers avatar greybird avatar jarroda avatar maldworth avatar phatboyg avatar

Stargazers

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

greenpipes's Issues

Issue with v3 Greenpipes.Payloads.PayloadCache

I used the Greenpipes v 3.0.0 with the
automatonymous v 4.2.0
masstransit as 5.5.6
masstransit.automatonymous as v 5.5.5

i received following error

Could not load type 'GreenPipes.Payloads.PayloadCache' from assembly 'GreenPipes, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b800c4cfcdeea87b'.

Could you please let us know how to resolve this one?

BasePipeContext.AddOrUpdatePayload - Update callback adds new element to context instead of updating

Hi,

I was investigating some issue and i've found that update callback in BasePipeContext.AddOrUpdatePayload

Interlocked.CompareExchange(ref _collection, currentCollection.Add(context), currentCollection);
always adds new element to context instead of updating it. Basically it does exactly the same as add.

                    if (_collection.TryGetPayload(out T existingValue))
                    {
                        if (context == null || previousValue != existingValue)
                            context = new PayloadValue<T>(updateFactory(existingValue));

                        previousValue = existingValue;

                        currentCollection = Volatile.Read(ref _collection);

                        Interlocked.CompareExchange(ref _collection, currentCollection.Add(context), currentCollection);
                    }

Is there any way to update existing value in context? Or is it maybe guaranteed that only newest added element is returned? So even though there is old object and new produced by update factory in context it will always return new one?

.Net Core 2.2 =>Runtime Error :Method not found

Hi, with latest masstransit + rabbitmq client I get this error.

Method not found: 'System.Reflection.Emit.AssemblyBuilder System.AppDomain.DefineDynamicAssembly(System.Reflection.AssemblyName, System.Reflection.Emit.AssemblyBuilderAccess)'.

image

ExponentialRetryPolicy materializes GetIntervals()

The constructor of ExponentialRetryPolicy materializes the IEnumerable<TimeSpan> returned from GetIntervals(). This seems directly opposed to its nature:

  • It is an iterator function.
  • It treats Int32.MaxValue as unlimited.

When using retryLimit: Int32.MaxValue, which GetIntervals() explicitly special-cases, the loop is infinite (until ToArray() tries to allocate an array that is too large).

Even when avoiding Int32.MaxValue, when trying to accommodate a very large number of attempts, the materialized array can take a lot of memory, when the intervals could just be calculated on-the-fly. Materialization also incurs a lot of calls to Random.Next() that would otherwise have been amortized over the lifetime of the policy instance.

A good alternative property type to TimeSpan[] might be IEnumerator<TimeSpan>, since it enforces forward-only behavior. It is a public property, unfortunately, so I'm not sure how far the impact reaches.

I ran into this issue when I was trying to use exponential message retries in MassTransit 7.0.7.

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.