Skip to content
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

Update to support modified IMessagePublisher interface #30

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Foundatio.RabbitMQ/Messaging/RabbitMQMessageBus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Threading.Tasks;
using Foundatio.AsyncEx;
using Foundatio.Extensions;
using Foundatio.Queues;
using Microsoft.Extensions.Logging;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
Expand Down Expand Up @@ -142,12 +143,13 @@ protected override async Task EnsureTopicCreatedAsync(CancellationToken cancella
/// <param name="messageType"></param>
/// <param name="message"></param>
/// <param name="delay">Along with the delay value, _delayExchange should also be set to true</param>
/// <param name="options"></param>
/// <param name="cancellationToken"></param>
/// <remarks>RabbitMQ has an upper limit of 2GB for messages.BasicPublish blocking AMQP operations.
/// The rule of thumb is: avoid sharing channels across threads.
/// Publishers in your application that publish from separate threads should use their own channels.
/// The same is a good idea for consumers.</remarks>
protected override Task PublishImplAsync(string messageType, object message, TimeSpan? delay, CancellationToken cancellationToken) {
protected override Task PublishImplAsync(string messageType, object message, TimeSpan? delay, MessageOptions options, CancellationToken cancellationToken) {
byte[] data = SerializeMessageBody(messageType, message);

// if the RabbitMQ plugin is not available then use the base class delay mechanism
Expand Down