graphql-platform icon indicating copy to clipboard operation
graphql-platform copied to clipboard

Subscriptions: RabbitMQ provider

Open Deathrage opened this issue 3 years ago • 3 comments

First version of RabbitMQ PubSub. Key assumptions are:

  • Rabbit topics are not used
  • HC topic is represented by a Rabbit exchange
  • For every HC topic, each HC instance holds a Rabbit consumer (n topics and m instances -> n*m consumers)
  • Every consumer has an exclusive queue to an exchange (n topics and m instances -> n*m consumers -> n*m queues)
  • Single consumer consumes only one queue (queue is exclusive)
  • Niether exchanges nor queues are durable
  • Behaviour above can be changed directly in Config DTO and/or by overriding IExchangeNameFactory and IQueueNameFactory

Schema how messages are distributed (illustrates that ISourceStream does not directly connect to RabbitMQ): image

Deathrage avatar Aug 20 '22 08:08 Deathrage

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 20 '22 08:08 CLAassistant

@michaelstaib I have inspected the issue reported by code analyzer, it seemst that it is caused by tests in namespace StrawberryShake.CodeGeneration.CSharp.Analyzers.CustomScalar as there is

public static class DependencyInjection
{
    public static void Configure(IServiceCollection services)
    {
        services.AddCustomScalarClient();
    }
}

But method AddCustomScalarClient does not exist. Is si supposed to get generated? If so, it does not happen.

Deathrage avatar Aug 20 '22 14:08 Deathrage

@Deathrage I am working on the code gen issue with strawberry shake ... so no worries. It started to happen when we moved to .net 7.

michaelstaib avatar Aug 21 '22 09:08 michaelstaib

We have reworked the subscription system and implemented this driver now with a separate PR.

michaelstaib avatar Dec 12 '22 20:12 michaelstaib