azbusqueue

command module
v2.0.0-...-d5bd659 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2024 License: BSD-2-Clause Imports: 7 Imported by: 0

README

Azure Service Bus Queue CLI

Introduction

This Go package provides a simple command-line interface (CLI) tool for interacting with Azure Service Bus Queue. It allows you to send/receive messages from/to a queue.

Getting started

Prerequisites

Installation

If you want to try out the tool, you'll need to:

  1. Deploy Azure Service Bus and create a queue.
  2. Install the tool.

Easiest way how-to do that is to use the Azure CLI and execute script.sh file:

wget https://raw.githubusercontent.com/groovy-sky/service-bus-queue-cli/main/script.sh
chmod +x script.sh
./script.sh

Examples

Once you have created a queue, you can use the tool to send/receive messages from/to the queue. At first you'll need to set the AZURE_SERVICEBUS_CONNECTION_STRING environment variable to your Azure Service Bus connection string. Here's how you can do it:

export AZURE_SERVICEBUS_CONNECTION_STRING="your-connection-string"

After that you can use the tool to send/receive messages from/to a queue.

Send message

To send a message(subject and reply-to are optional):

azbusqueue send --queue your-queue-name --message "Your message" --subject "Your subject" --replyto "Your reply-to"
Receive message

To receive a message from a queue:

azbusqueue read --queue your-queue-name

Documentation

Overview

Following package is CLI tool, which you can read and send message to Azure Service Bus Queue For authentication you need to set environment variable AZURE_SERVICEBUS_CONNECTION_STRING

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL