-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/rabbitmq adapters #87
base: main
Are you sure you want to change the base?
Conversation
…rsistence.RabbitMq.
I can see more than 18 code warnings in this PR, can you do what it takes to remove the warnings? We see those in Rider, but you may not see them in VS which is a problem I need to solve. To get VS to use the same formatting rules. Perhaps I need to format your code (In Rider) once it is all in shape, but then I would need permission to edit the PR, which I dont think I have right now in your repo? |
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not define nor here, as they are controlled centrally in Directory.Build.props at the root of the repo
<value>Message cannot be empty</value> | ||
</data> | ||
<data name="ValidationExtensions_InvalidStorageAccountResourceName" xml:space="preserve"> | ||
<value>The Azure Storage Table/Blob/Queue name: '{0}' contains illegal characters or is not the correct length</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this message be reworded? and are you sure the name is correct? Is StorageAccount a thing in the RabbitMq world?
|
||
public const string RabbitMqExchangeNameValidationExpression = @"^[a-z0-9_\.\-\/]{1,255}$"; | ||
|
||
public const string StorageAccountResourceNameValidationExpression = @"^[a-z0-9\-]{3,63}$"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this named correctly?
useAsyncDispatcher); | ||
return options.ToConnectionString(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is all this dead code? can we remove it all?
internal const string PasswordSettingName = "ApplicationServices:Persistence:RabbitMQ:Password"; | ||
internal const string VirtualHostSettingName = "ApplicationServices:Persistence:RabbitMQ:VirtualHost"; | ||
|
||
public RabbitMqStoreOptions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be private, to stop consumers using it directly, and force them to use the From* methods below?
using RabbitMQ.Client; | ||
|
||
namespace Infrastructure.Persistence.RabbitMq.ApplicationServices | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We prefer using namespaces without blocks
|
||
public override bool Equals(object? obj) | ||
{ | ||
if (obj is not TopicExistence other) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code formatting rules should wrap the if statement in braces.
@@ -0,0 +1,12 @@ | |||
namespace Infrastructure.Persistence.Shared.IntegrationTests.RabbitMq; | |||
|
|||
public static class RabbitMqBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead code? can remove?
_emulator.StartAsync().GetAwaiter().GetResult(); | ||
|
||
var connectionString = _emulator.GetConnectionString(); | ||
var managementUri = _emulator.GetManagementUri(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead code?
.WithPortBinding(15672, assignRandomHostPort: true) | ||
.WithEnvironment("RABBITMQ_DEFAULT_USER", "guest") | ||
.WithEnvironment("RABBITMQ_DEFAULT_PASS", "guest") | ||
.WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(5672)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this port be moved to a constant at top of this file?
Implement specific technology adapters for RabbitMQ in a new assembly.