Git Product home page Git Product logo

azureservicebusbotrelay's Introduction

Overview

An relay utility for bots based on Azure Service Bus.

This utility allows you forward a message sent to a bot hosted on any channel to your local machine.

It is useful for debug scenarios or for more complex situations where the BotEmulator is not enough (i.e.: you use the WebChat control hosted on a site and you need to receive ChannelData in your requests).

Acknowledgments

Part of this code is based on the work that Pedro Felix did in his project here.

How to configure and run the utility

  1. Create an Azure Relay Service on your Azure Subscription.
  2. Write down the key value for the RootManageSharedAccessKey role.
  3. Pull this utility from github.
  4. Open the solution in Visual Studio 2017 and update the following parameters in app.config:
    • SBNamespace: the namespace you used to create the service bus relay, don’t include .servicebus.windows.net, this will be appended in code.
      Example: contosorelay.
    • SBPolicyKey: the key for RootManageSharedAccessKey role in service bus.
    • SBRelayName: the name of the relay to be created. The utility will create a dynamic relay for you, just put a name here that will be used in the service URL for the bot.
      Example DebugBot
    • TargetServiceAddress: update this if you are using anything different than http://localhost:3979/
  5. Update the message endpoint for your bot to point to the SB namespace and relay (replace [SBNamespace] and [SBRelayName] by the values you included in app.config):
    https://[SBNamespace].servicebus.windows.net/[SBRelayName]/api/messages
    For example:
    https://contosorelay.servicebus.windows.net/DebugBot/api/messages
  6. Compile an run the utility, your bot should now send messages to Azure Service Bus and the utility will forward them to your local machine on TargetServiceAddress so you can debug.

azureservicebusbotrelay's People

Contributors

gabog 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.