Skip to content
Go client for Azure Service Bus Queue
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE.txt
README.md
appveyor.yml test: fix misprint Feb 13, 2018
client.go
client_test.go
codecov.yml
errors.go
logging.go First commit Feb 13, 2018
logging_test.go

README.md

Go client for Azure Service Bus Queue

GoDoc Build status codecov

Install and Use:

Install

$ go get -u github.com/g-rad/go-azurequeue

or if you use dep, within your repo run:

$ dep ensure -add github.com/g-rad/go-azurequeue

If you need to install Go, follow the official instructions.

Use

Init Client
import queue "github.com/g-rad/go-azurequeue"

cli := queue.QueueClient{
  Namespace:  "my-test",
  KeyName:    "RootManageSharedAccessKey",
  KeyValue:   "ErCWbtgArb55Tqqu9tXgdCtopbZ44pMH01sjpMrYGrE=",
  QueueName:  "my-queue",
  Timeout:    60,
}
Send Message
// create message
msg := queue.NewMessage(]byte("Hello!"))

msg.Properties.Set("Property1", "Value1")
msg.Properties.Set("Property2", "Value2")

// send message
cli.SendMessage(&msg)
Receive Next Message
msg, err := cli.GetMessage()
Unlock Message

If you failed to process a message, unlock it for processing by other receivers.

cli.UnlockMessage(&msg)
Delete Message

This operation completes the processing of a locked message and deletes it from the queue.

cli.DeleteMessage(&msg)
You can’t perform that action at this time.