Skip to content

Commit

Permalink
RabbitMq Bug fix (#82)
Browse files Browse the repository at this point in the history
* change exchange type based on acceptable values for rabbitmq

* use ToLower in ExchangeDeclare

---------

Co-authored-by: Farzaneh Soltanzadeh <[email protected]>
  • Loading branch information
Fr-Soltanzadeh and Farzaneh Soltanzadeh committed Mar 29, 2024
1 parent 28e71e5 commit 6ba4587
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public enum BrokerType
/// Direct exchange type routes messages based on exact matching of routing keys.
/// </summary>
Direct,

/// <summary>
/// Topic exchange type routes messages based on wildcard patterns in routing keys.
/// </summary>
Expand All @@ -23,6 +23,6 @@ public enum BrokerType
/// <summary>
/// Fan-out exchange type routes messages to all bound queues without considering routing keys.
/// </summary>
FanOut
FanOut,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void Publish<TModel>(IEvent<TModel> @event) where TModel : IEventDataMode
{
ExchangeOptions exchangeOptions = _options.Value.ExchangeOptions;

channel.ExchangeDeclare(exchangeOptions.BrokerName, exchangeOptions.ExchangeType.ToString(), exchangeOptions.Durable,
channel.ExchangeDeclare(exchangeOptions.BrokerName, exchangeOptions.ExchangeType.ToString().ToLower(), exchangeOptions.Durable,
exchangeOptions.AutoDelete, exchangeOptions.Arguments);

string message = JsonConvert.SerializeObject(@event);
Expand Down

0 comments on commit 6ba4587

Please sign in to comment.