-
Notifications
You must be signed in to change notification settings - Fork 3
RabbitMqClient v6 => v7 #43
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
Conversation
Poltuu
left a comment
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.
🤷♂️
| } | ||
| } | ||
| Task SendAsync(Sample sample); | ||
| Task ConsumeAsync(EventHandler<Sample> onSampleReceived); |
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.
on garde un EventHandler standard en fin de compte,
on arrive à se passer de l'implem de RabbitMQ.Client ?
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.
Sur le Consume ils ont gardé l'EventHandler côté lib, c'est pour le Stop que ça a changé
| } | ||
|
|
||
| public void StopConsuming(EventHandler onConsumerStopped) | ||
| public async Task StopConsuming(AsyncEventHandler<ConsumerEventArgs> onConsumerStopped) |
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.
ah ici 😞
le StopConsuming est sur l'interface IConsumer j'imagine
| { | ||
| var basicProperties = CreateBasicProperties(message); | ||
| var addr = new PublicationAddress("", ExchangeName, message.GetRoutingKey()); | ||
| using var cts = new CancellationTokenSource(new TimeSpan(TimeoutInMilliseconds * TimeSpan.TicksPerMillisecond)); |
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.
👍
| } | ||
| public async Task DeclareExchangeAsync(string exchangeName, string exchangeType) | ||
| { | ||
| if (string.IsNullOrWhiteSpace(exchangeName)) throw new ArgumentNullException(nameof(exchangeName)); |
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.
| if (string.IsNullOrWhiteSpace(exchangeName)) throw new ArgumentNullException(nameof(exchangeName)); | |
| ArgumentNullException.ThrowIfNullOrWhiteSpace(exchangeName); |
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.
Pas dispo ici apparement :(
| return DeclareQueue(queueName, queueArgs, isQuorum); | ||
| public Task<string> DeclareQueueWithDeadLetterPolicyAsync(string queueName, string deadLetterExchange, int messageTimeToLive, string deadLetterRoutingKey, bool isQuorum) | ||
| { | ||
| if (string.IsNullOrWhiteSpace(deadLetterExchange)) throw new ArgumentNullException(nameof(deadLetterExchange)); |
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.
| if (string.IsNullOrWhiteSpace(deadLetterExchange)) throw new ArgumentNullException(nameof(deadLetterExchange)); | |
| ArgumentNullException.ThrowIfNullOrWhiteSpace(deadLetterExchange); |
| if (queueArgs == null) throw new ArgumentNullException(nameof(queueArgs)); | ||
| public async Task<string> DeclareQueueAsync(string queueName, Dictionary<string, object> queueArgs, bool isQuorum) | ||
| { | ||
| if (string.IsNullOrWhiteSpace(queueName)) throw new ArgumentNullException(nameof(queueName)); |
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.
| if (string.IsNullOrWhiteSpace(queueName)) throw new ArgumentNullException(nameof(queueName)); | |
| ArgumentNullException.ThrowIfNullOrWhiteSpace(queueName); |
| public async Task DeclareBindingAsync(string exchangeName, string queueName, string routingKey, Dictionary<string, object> headerBindings) | ||
| { | ||
| if (string.IsNullOrWhiteSpace(exchangeName)) throw new ArgumentNullException(nameof(exchangeName)); | ||
| if (string.IsNullOrWhiteSpace(queueName)) throw new ArgumentNullException(nameof(queueName)); |
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.
idem partout :)
aa7b730 to
1aace47
Compare
Tout passe asyc, nécessaire pour les projets utilisant aussi
Lucca.Core.Eventset qui veulent passer en version 8+ (https://github.com/LuccaSA/Lucca.Core.Events/releases/tag/v8.0.0)rabbitmq/rabbitmq-dotnet-client#1720
https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/v7-MIGRATION.md
AsyncEventHandleren signature deUnregisteredAsyncqui est une implémentation de RabbitMqClient.