Skip to content

Commit

Permalink
Comments…
Browse files Browse the repository at this point in the history
  • Loading branch information
dannythunder committed Apr 27, 2023
1 parent 8c4bf16 commit ee8bb47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Wolverine.Mediator.RabbitMq.ReceiverDual.Helpers;

public class MessagebrokerMessagesHelper
{
public static Type[] EXTERNAL_EVENTS => new[]
public static Type[] EXTERNAL_EVENTS_TYPES => new[]
{
// From service Wolverine.Mediator.RabbitMq.Sender
typeof(RemoteEvent),
Expand All @@ -15,7 +15,7 @@ public class MessagebrokerMessagesHelper
// From a third service
};

public static Type[] SERVICE_COMMANDS => new[]
public static Type[] SERVICE_COMMANDS_TYPES => new[]
{
// From service Wolverine.Mediator.RabbitMq.Sender
typeof(RemoteCommand)
Expand Down
8 changes: 6 additions & 2 deletions Wolverine.Mediator.RabbitMq.ReceiverDual/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
var connectionString = builder.Configuration.GetConnectionString("MessageBroker");

opts.UseRabbitMq(new Uri(connectionString))
.AddQueueBindingsForMessages(queueName, MessagebrokerMessagesHelper.SERVICE_COMMANDS) // Messages for this service
.AddQueueBindingsForMessages(queueName, MessagebrokerMessagesHelper.EXTERNAL_EVENTS) // Events from other services

// These are essentially
//opts.DeclareExchange(exchangeName: type.Name).BindExchange(exchangeName: type.Name).ToQueue(queueName: queueName, bindingKey: type.Name);
.AddQueueBindingsForMessages(queueName, MessagebrokerMessagesHelper.SERVICE_COMMANDS_TYPES) // Messages for this service
.AddQueueBindingsForMessages(queueName, MessagebrokerMessagesHelper.EXTERNAL_EVENTS_TYPES) // Events from other services

.AutoProvision();

opts.ListenToRabbitQueue(queueName, q =>
Expand Down

0 comments on commit ee8bb47

Please sign in to comment.