Get Started with Queues v1.6.0+ stable

Table of Content

Get KubeMQ Token

Every installation method requires a KubeMQ token.

Please register to obtain your KubeMQ token.

Get KubeMQ CLI - kubemqctl

macOS / Linux

curl -sL https://get.kubemq.io/install | sh 
1

Windows

Option 1:

  • Download the latest kubemqctl.exe.
  • Place the file under e.g. C:\Program Files\kubemqctl\kubemqctl.exe
  • Add that directory to your system path to access it from any command prompt

Option 2:

Run in PowerShell as administrator:

New-Item -ItemType Directory 'C:\Program Files\kubemqctl'
Invoke-WebRequest https://github.com/kubemq-io/kubemqctl/releases/download/latest/kubemqctl.exe -OutFile 'C:\Program Files\kubemqctl\kubemqctl.exe'
[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine) + ';C:\Program Files\kubemqctl', [EnvironmentVariableTarget]::Machine)
$env:Path += ';C:\Program Files\kubemqctl'
1
2
3
4

Create KubeMQ Cluster

Run kubemqctl create cluster command:

kubemqctl cluster create -t <YOUR_KUBEMQ_TOKEN>
1

For Example:

kubemqctl-create-basic.gif

Connect Your KubeMQ Cluster

To be able to communicate with KubeMQ interface ports running in Kubernetes cluster, a Port Forward of KubeMQ's ports is needed.

kubemqctl has a handy command that will do it for you:

kubemqctl cluster proxy
1

Send a Queue Message

The producer can send a message to the "hello-world-queue" channel with one of the following methods.

  • kubemqctl
  • cURL
  • .Net
  • Java
  • Go
  • Python
  • Node
  • PHP
  • Ruby
  • jQuery

Run the following kubemqctl command:

kubemqctl queues send "hello-world-queue" "this is a queue message"
1

A result message will be shown with an indication of the sending time of the message.

Receive a Queue Message

After you have sent a message to a queue, you can request the message from a queue.

  • kubemqctl
  • cURL
  • .Net
  • Java
  • Go
  • Python
  • Node
  • PHP
  • Ruby
  • jQuery

Run the following kubemqctl command:

kubemqctl queues receive "hello-world-queue"
1

Get Queues information

You can get Queues information by running kubemqctl queues list.

Demo

Last Updated: 10/2/2019, 10:27:00 AM