Get Started with RPC v1.5.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

Subscribe to Commands Channel

A receiver can subscribe to the hello-command channel with one of the following methods.

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

Run the following kubemqctl command:

 kubemqctl commands rec "hello-command" -a
1

When connected, the stream will block until receiving a command. Once a command will be received, kubemqctl automatically will send a Response.

Send to Commands Channel

After you have subscribed to a hello-command channel, you can send your command to it.

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

Run the following kubemqctl command:

kubemqctl commands send "hello-command" "some command"
1

Demo

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