by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Muhammd Majid
    @majumajid

    So , who will publish ? from outbox or service
    As per this code every time store outbox only

    '''
    foreach (var @event in events)
    {
    if (@event is null)
    {
    continue;
    }

                var messageId = Guid.NewGuid().ToString("N");
                _logger.LogTrace($"Publishing integration event: {@event.GetType().Name} [id: '{messageId}'].");
                if (_outbox.Enabled)
                {
                    await _outbox.SendAsync(@event, originatedMessageId, messageId, correlationId, spanContext,
                        correlationContext, headers);
                    continue;
                }
    
                await _busPublisher.PublishAsync(@event, messageId, correlationId, spanContext, correlationContext,
                    headers);
            }''' 
    Piotr Gankiewicz
    @spetz
    internal background job takes messages from DB and tries to publish them
    this is outbox
    Muhammd Majid
    @majumajid
    Thank you for making clear understanding
    Now everything clear for me
    Piotr Gankiewicz
    @spetz
    cool
    Banybah Kossi Selom
    @selombanybah
    Hello Guys, Is there a template that can be given to beginner so its easy for them to start with something like dotnet new convey-simple, dotnet new convey-advanced etc.. just an idea I have in my head
    Muhammd Majid
    @majumajid
    Piotr Gankiewicz
    @spetz
    @selombanybah no template in terms of dotnet template CLI, but you can check Pacco or very simple samples under Convey source code
    Gracjan
    @Serfin
    Hey guys, recently i got so much triggered about my windows performance so I want try switching to linux, which distro should i try ?
    Piotr Gankiewicz
    @spetz
    Check out Pop OS
    Banybah Kossi Selom
    @selombanybah
    Thank you @spetz for your answer
    Gerard
    @1304654_gitlab
    Hi!! I need help. How can I implement In that product service some kind of cache in order to store the product pictures(jpeg..). Or my be should be better build another service in order to store the pictures only and when an product event was fired handle in the picture services and store that image. What are your best option in order to store pictures? Can you recommend some ideas?
    Piotr Gankiewicz
    @spetz
    When it comes to storing the files, I do recommend, to upload them to e.g. S3 services on AWS, DO or other cloud providers, to not store them in an actual DB if not needed.
    Piotr Gankiewicz
    @spetz

    Hey all, please join https://gitter.im/devmentors-io/microservices-net as we're migrating this channel :)

    check out our newest article about pacco + microservices .net and yt recording :)
    Gary
    @Graphimage
    great
    Nico Sap
    @NicoJuicy
    Checked, awesome (y)
    smurariu
    @smurariu
    Nice!
    Piotr Gankiewicz
    @spetz
    Thanks!
    QuynhDD
    @quynhdd
    Hi team
    Piotr Gankiewicz
    @spetz
    Hi
    Gopal Chettri
    @gopalchettri
    Hi team, can anyone guide me or point me how to implement membership and Identity Server as microservices.
    Xavier Sánchez
    @xatienza
    Hi everyone, I'm testing the DCN-Shop project. Please can you show me an example of how to use the MongoDbSeeder? Thank you!
    Piotr Gankiewicz
    @spetz
    @gopalchettri hey, so identity server is a totally separate concept, which would actually require a separate long course
    we do have basic identity service issuing and validating JWT on github
    @xatienza simply create a custom class implementing IMongoDbSeeder and register it in IoC :)
    and in mongo section in appsettings set seed: true

    We've published today 3rd demo lesson https://www.youtube.com/watch?v=TM3DpaWdLRM - Ocelot API Gateway + RabbitMQ :)

    Gerard
    @1304654_gitlab
    Thanks. A small question. Entity Id should be a infrastructure concern? Let'me explain, I think that ID's it's database concept, for that every data base it has they type ID. I don't know if should be better a entity type with generic Id like Client<T>{ public ID T}, then the implementation of the repository I doesn't coupled to ID type (In your Dshop GUID's) and the implementation should be ClientRepository<T>{ public getbyID(id T)...}. Or I'm overcomplicating myself?
    Piotr Gankiewicz
    @spetz
    ID is part of an aggregate, so it shouldnt be generic, but keep in mind that you can think of some natural key like e.g. user email and infrastructural id (auto incremented number). The generic repo is useful but when used via composition, otherwise you expose whole CRUD actions for the entity that maybe should never be deleted (for example an order)
    Nick Alt
    @altnp

    Is the Saga example in PACCO complete?

    I am not seeing a handler for the rejected events (such as create_order_rejected) so the compensation is not getting triggered.

    Also didn't see a ntrada endpoint for the make order.

    Just want to make sure I am not missing something here...

    Xavier Sánchez
    @xatienza
    Thanks Piotr for your answer!
    Piotr Gankiewicz
    @spetz
    @NicoJuicy it's in order maker service (saga sample, and its not exposed via gateway)
    Piotr Gankiewicz
    @spetz

    Microservices .NET course is finally released! Over 22 hours of a comprehensive introduction into the modern microservices' architecture.

    https://devmentors.io/courses/microservices-net

    Check out the 7 (out of 40+) demo lessons and cool discounts :)

    https://www.youtube.com/devmentors

    Jakub
    @jakubmichalewski
    Good stuff guys!!
    Piotr Gankiewicz
    @spetz
    Thanks! :)
    John Brown
    @johnbrown84
    Hi Piotr, i am having an issue with rabbitmq. I am sending 50 http delete request in a row to my Api Gateway from my SAP client, and my api gateway publish these request. So the issue is when publishing message, an error keep throwing in the middle of publishing message.
    That always occurs when publishing 30++ message in a row. Here is the error :
    {"Already closed: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=505, text='UNEXPECTED_FRAME - expected content header for class 60, got non content header frame instead', classId=60, methodId=40"}
    Piotr Gankiewicz
    @spetz
    @johnbrown84 hey, what's your setup? What libraries do you use to talk to rabbitmq? Could you share the code?
    John Brown
    @johnbrown84
    Setup is almost same as pacco, except gateway. Pacco gateway is using ntrada, mine is just tipical gateway that publishes messages to broker. I'm using convey library. And I have fixed the problem here. The problem is inside convey library, In RabbitMqClient, channel is created to publish messages but after that its not closed at all. Here is the code i have added and its fixed.
    image.png
    Btw In your ntrada package , you have already that code.
    Piotr Gankiewicz
    @spetz
    Thanks, will check this one out, thought one of the references was to also keep channels long living for the particular thread, but need to test it once again
    John Brown
    @johnbrown84
    ok thanks
    Piotr Gankiewicz
    @spetz
    @johnbrown84 pushed the fix (BTW let's move to https://gitter.im/devmentors-io/microservices-net channel for future)
    John Brown
    @johnbrown84
    yes i just checked it, thank you very much:) ok
    Piotr Gankiewicz
    @spetz
    thanks as well!
    Gerard
    @1304654_gitlab

    Hey guys!! Your are awsome.I open a small debate around the entities. What do you think is the most appropriate time to modify an entity? For example, given a command called EditClientCommand, it has to attach all the properties since, because of rest in the PUT call, it has to be idemptent. Once the command reaches its
    respective handler, it is necessary to update and validate the properties. How do you implement the validation? Is better do two validations one in command and other in entity?

    public async Task<ContextJobResponse> Handle(UpdateTreatmentCommand request, CancellationToken cancellationToken)
            {
                var treatment = await this.treatmentsRepository.GetAsync(request.TreatmentId);
    
                treatment.UpdateIdempotency( //<== Is that good?
                    request.Name,
                    request.NameTicket,
                    request.Description,
                    request.Tax,
                    request.Price,
                    request.Images,
                    request.IdEmployee,
                    request.Gender,
                    request.Categories,
                    request.AvgTime,
                    request.Active
                    );
    //Or will be better do FOR EVERY PROPERTY :S
    treatment.SetName(...);
    treatment.SetDescription(...);
    //
    
    
    
    
                await treatmentsRepository.UpdateAsync(treatment);

    Inside UpdateIdempotency I Validate every property but I think Smells bad...