How to Configure the RabbitMQ Trigger in Azure Functions?

Tal Mirzai 0 Reputation points
2023-02-27T09:53:49.09+00:00

Hello everyone,

I've been struggling with this one for a while now and will much appreciate your help!

The task is simple - Listen to events (messages) that are being sent from RabbitMQ and send their payload to LogicApps. I've decided to use Azure Functions for this task and I'm developing the code in the portal, not locally.

This article supposed to help but it has many blank spots:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-rabbitmq-trigger?tabs=in-process&pivots=programming-language-javascript

I've followed it step by step but it's not working. I have a few suggestions as to why and will love your help with them:

  1. connectionStringSetting - This object (from my understanding) contains the rabbit's username, password & host. Where do I need to put them? I tried adding new application in Configuration>Application Settings using this structure:
amqp://username:password@host:0000/vhost

Do I need vhost at all?

  1. If I'm using Java, do I need anything more than function.json & index.js? expect for the connectionStringSetting & QueueName do I need to put any other values?
  2. Am I missing something?

This is my function.json file:

{
  "bindings": [
    {
      "name": "myQueueItem",
      "type": "rabbitMqTrigger",
      "direction": "in",
      "queueName": "Payoneer.Kafka.RiskyOfferMessage",
      "connectionStringSetting": "rabbitMQConnection"
    }
  ]
}

Thank you!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,390 questions
{count} votes