2016-11-17 16:33:27 +00:00
|
|
|
|
using System.Threading.Tasks;
|
2017-01-31 11:01:08 +00:00
|
|
|
|
using RabbitMQ.Client;
|
2016-11-17 16:33:27 +00:00
|
|
|
|
|
|
|
|
|
namespace Tapeti
|
2016-11-16 22:11:05 +00:00
|
|
|
|
{
|
2017-02-05 22:22:34 +00:00
|
|
|
|
// Note: Tapeti assumes every implementation of IPublisher can also be cast to an IInternalPublisher.
|
|
|
|
|
// The distinction is made on purpose to trigger code-smells in non-Tapeti code when casting.
|
2016-11-16 22:11:05 +00:00
|
|
|
|
public interface IPublisher
|
|
|
|
|
{
|
2016-11-17 16:33:27 +00:00
|
|
|
|
Task Publish(object message);
|
2016-11-16 22:11:05 +00:00
|
|
|
|
}
|
2017-01-31 11:01:08 +00:00
|
|
|
|
|
|
|
|
|
|
2017-02-05 22:22:34 +00:00
|
|
|
|
public interface IInternalPublisher : IPublisher
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
|
|
|
|
Task Publish(object message, IBasicProperties properties);
|
|
|
|
|
Task PublishDirect(object message, string queueName, IBasicProperties properties);
|
|
|
|
|
}
|
2016-11-16 22:11:05 +00:00
|
|
|
|
}
|