Coder Social home page Coder Social logo

jatinsanghvi / azure-functions-rabbitmq-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure/azure-functions-rabbitmq-extension

0.0 1.0 0.0 296 KB

RabbitMQ extension for Azure Functions

License: MIT License

C# 94.35% Java 5.53% Batchfile 0.12%

azure-functions-rabbitmq-extension's Introduction

Branch Status
dev Build Status

RabbitMQ Binding Support for Azure Functions

NuGet Package Microsoft.Azure.WebJobs.Extensions.RabbitMQ

Please note that the RabbitMQ extension is fully supported on Premium and Dedicated plans. Consumption is not supported. The Azure Functions RabbitMQ Binding extensions allow you to send and receive messages using the RabbitMQ API but by writing Functions code. The RabbitMQ output binding sends messages to a specific queue. The RabbitMQ trigger fires when it receives a message from a specific queue.

RabbitMQ Documentation for the .NET Client

To get started with developing with this extension, make sure you first set up a RabbitMQ endpoint. Then you can go ahead and begin developing your functions in C#, C# Script, JavaScript, Python or Java.

Samples

See the repository wiki for more detailed samples of bindings to different types.

public static void RabbitMQTrigger_RabbitMQOutput(
    [RabbitMQTrigger("queue", ConnectionStringSetting = "RabbitMQConnectionAppSetting")] string inputMessage,
    [RabbitMQ(
        ConnectionStringSetting = "RabbitMQConnectionAppSetting",
        QueueName = "hello")] out string outputMessage,
    ILogger logger)
{
    outputMessage = inputMessage;
    logger.LogInformation($"RabbitMQ output binding function sent message: {outputMessage}");
}

The above sample waits on a trigger from the queue named "queue" connected to the connection string value of key "RabbitMQConnectionAppSetting." The output binding takes the messages from the trigger queue and outputs them to queue "hello" connected to the connection configured by the key "RabbitMQConnectionAppSetting". When running locally, add the connection string setting to local.settings.json file. When running in Azure, add this setting as Application Setting for your app.

Properties

Property Name Description Example
ConnectionStringSetting The connection string for the RabbitMQ queue amqp://user:password@url:port
QueueName The name of the source or destination queue.
HostName (ignored if using ConnectionStringSetting) Hostname of the queue 10.26.45.210
UserName (ignored if using ConnectionStringSetting) User name to access queue user
Password (ignored if using ConnectionStringSetting) Password to access queue password
EnableSsl Bool to enable or disable SSL in AMQP connection (default false) true
SkipCertificateValidation Bool to enable or disable checking certificate when EnableSsl=true. It will accept RemoteCertificateChainErrors and RemoteCertificateNameMismatch errors (default false. Not recommended for production) true

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azure-functions-rabbitmq-extension's People

Contributors

aaguilartablada avatar cachai2 avatar fabiocav avatar ggjason avatar jatinsanghvi avatar jeffhollan avatar katiecai avatar microsoftopensource avatar msftgits avatar pat-goins avatar pragnagopa avatar socolin avatar yojagad avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.