BasicRabbitMQClient 1.0.3

This library has been created for simple uses only. See for advanced uses https://www.rabbitmq.com/tutorials/tutorial-one-dotnet.html

Install-Package BasicRabbitMQClient -Version 1.0.3
dotnet add package BasicRabbitMQClient --version 1.0.3
<PackageReference Include="BasicRabbitMQClient" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BasicRabbitMQClient --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BasicRabbitMQClient, 1.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install BasicRabbitMQClient as a Cake Addin
#addin nuget:?package=BasicRabbitMQClient&version=1.0.3

// Install BasicRabbitMQClient as a Cake Tool
#tool nuget:?package=BasicRabbitMQClient&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

BasicRabbitMQ

BasicRabbitMQ .netCore Example

This library has been created for simple uses only. See for advanced uses https://www.rabbitmq.com/tutorials/tutorial-one-dotnet.html
> Install-Package BasicRabbitMQClient -Version 1.0.3

Consumer Example

using BasicRabbitMQClient;
using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        { 
            //Parameters (hostname username password)
            var rabbitMqConnectionProvider = new RabbitMqConnectionProvider("192.168.1.2", "username", "password");
            var rabbitMqConsumer = new RabbitMqConsumer(rabbitMqConnectionProvider);
            rabbitMqConsumer.Consume(YourMethod, "YourQueueName");
        }

        public static bool YourMethod(string incomingTextFromQueue)
        {
            //Your bussiness logic here.
            //Use the text came from Queue
            Console.WriteLine(incomingTextFromQueue+ " came from Queue");
            return true;
        }
    }
}

Publisher Example

using System;
using BasicRabbitMQClient;
using RabbitMQ.Client;

namespace ConsoleApp2
{
    class Program
    {

        static void Main(string[] args)
        {
            try
            {
                YourPublishMethod("Test Text", "testQuee");
                Console.WriteLine("Message added to queue...");
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occured:" + e);
                throw;
            }
            Console.ReadLine();
        }

        public static bool YourPublishMethod(string sendTextToQueue, string queueName)
        {
            //Parameters (hostname username password)
            var rabbitMqConnectionProvider = new RabbitMqConnectionProvider("192.168.1.2", "username", "password");
            var puplicationAdress = new PublicationAddress(ExchangeType.Direct, string.Empty, queueName);
            var rabbitMqPublisher = new RabbitMqPublisher(rabbitMqConnectionProvider, puplicationAdress, sendTextToQueue);
            rabbitMqPublisher.Publish();
            return true;
        }
    }
}

BasicRabbitMQ

BasicRabbitMQ .netCore Example

This library has been created for simple uses only. See for advanced uses https://www.rabbitmq.com/tutorials/tutorial-one-dotnet.html
> Install-Package BasicRabbitMQClient -Version 1.0.3

Consumer Example

using BasicRabbitMQClient;
using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        { 
            //Parameters (hostname username password)
            var rabbitMqConnectionProvider = new RabbitMqConnectionProvider("192.168.1.2", "username", "password");
            var rabbitMqConsumer = new RabbitMqConsumer(rabbitMqConnectionProvider);
            rabbitMqConsumer.Consume(YourMethod, "YourQueueName");
        }

        public static bool YourMethod(string incomingTextFromQueue)
        {
            //Your bussiness logic here.
            //Use the text came from Queue
            Console.WriteLine(incomingTextFromQueue+ " came from Queue");
            return true;
        }
    }
}

Publisher Example

using System;
using BasicRabbitMQClient;
using RabbitMQ.Client;

namespace ConsoleApp2
{
    class Program
    {

        static void Main(string[] args)
        {
            try
            {
                YourPublishMethod("Test Text", "testQuee");
                Console.WriteLine("Message added to queue...");
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occured:" + e);
                throw;
            }
            Console.ReadLine();
        }

        public static bool YourPublishMethod(string sendTextToQueue, string queueName)
        {
            //Parameters (hostname username password)
            var rabbitMqConnectionProvider = new RabbitMqConnectionProvider("192.168.1.2", "username", "password");
            var puplicationAdress = new PublicationAddress(ExchangeType.Direct, string.Empty, queueName);
            var rabbitMqPublisher = new RabbitMqPublisher(rabbitMqConnectionProvider, puplicationAdress, sendTextToQueue);
            rabbitMqPublisher.Publish();
            return true;
        }
    }
}

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.3 452 1/11/2019
1.0.2 381 1/10/2019
1.0.1 262 12/27/2018
1.0.0 275 12/27/2018