Git Product home page Git Product logo

lucashuet93 / durable-functions-producer-consumer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/durable-functions-producer-consumer

0.0 1.0 0.0 412 KB

Uses Durable Functions' fan out pattern to load N messages across M sessions in to Service Bus, Event Hubs, or Storage Queues. Includes the ability to consume the messages with another Azure Function & load timing data in to Event Hubs for ingestion in to analytics services like Azure Data Explorer

License: MIT License

C# 83.94% PowerShell 16.06%

durable-functions-producer-consumer's Introduction

Original Repository

This repository is a fork of durable-functions-producer-consumer Azure Sample. Refer to the Azure Samples repository for usage and deployment instructions.

Fork Changes Overview

A few changes have been made to the Storage Queue producer code in the Functions.cs file.

  1. The Storage Queue producer's orchestrator endpoint now accepts a MessageContent property in addition to the existing NumberOfMessages property, rather than using hardcoded message content's that pull from the messagecontent.txt file. The change enables different messages to be sent to the orchestrator without the need to redeploy the function app. The orchestration endpoint request body has the following stucture:
{
  "NumberOfMessages": 3,
  "MessageContent": "test message"
}
  1. The producer attaches a CorrelationId property to each message in a given batch for load testing purposes.

  2. The producer now implements a claims-check pattern. When the function receives a request, it writes the MessageContent to a new file on an FTP server, then sends a new message to the Azure Queue with the file location as the content of the message. Downstream services can now read messages from the Azure Queue more rapidly and pull the actual contents of the message from the FTP server. In order to achieve this, a few values have been added to the local.settings.json file, and will need to be added to the function app's configuration settings once deployed:

  "FtpServerBaseUrl": "ftp://000.00.00.00/",
  "FtpServerFolderName": "folder",
  "FtpUsername": "username",
  "FtpPassword": "password"

durable-functions-producer-consumer's People

Contributors

brandonh-msft avatar lucashuet93 avatar mcollier avatar microsoftopensource avatar msftgits avatar supernova-eng 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.