There aren't any major breaking API changes. However, given
the ongoing evolution of the RabbitMQ HTTP API, in particular in the 4.x
development lifecycle, it makes sense to bump the major version of
this client and continue tracking RabbitMQ 3.13.x
and (in development
at the time of writing) 4.x
.
They will be gone starting with RabbitMQ 4.x. These are OS-level metrics and should be monitored as such.
GitHub issue: #313
Contributed by @pafmaf.
GitHub issue: #312
This release was retracted in favor of 3.1.0
.
UploadVhostDefinitions
is a new function that's similar to UploadDefinitions
but
allows for definition upload for a specific virtual host.
Contributed by @lescactus.
GitHub issue: #274
Contributed by @mcwarman.
that affected RabbitMQ versions older than 3.11.8.
Contributed by @vitorquintanilha.
GitHub issue: #284
Contributed by @ChunyiLyu.
GitHub issue: #266
GitHub issue: #261
Contributed by @mqhenning.
Correctly pass dest-publish-properties
as a map.
GitHub issue: #262
Contributed by @Galvill.
GitHub issue: #253
GitHub issue: #233
GitHub issue: #220
Contributed by @shubhang93.
GitHub issue: #217
Contributed by @aitorpazos.
GitHub issue: #217
Contributed by @aitorpazos.
GitHub issue: #211
Contributed by @needsaholiday.
This release contains minor breaking public API changes.
struct values in ExportedDefinitions
, QueueInfo
, and ExchangeInfo
have all been changed to pointers. This is to avoid having the empty struct values returned when exporting definitions and listing queues and exchanges.
Updated ExportedDefinitions
, ExchangeInfo
and QueueInfo
.
Contributed by @mkuratczyk.
QueueInfo
and ExchangeInfo
now use a special type for AutoDelete
because returned value from RabbitMQ server could be a boolean or a string value "undefined".
// AutoDelete is a boolean but RabbitMQ may return the string "undefined"
type AutoDelete bool
// ExchangeInfo represents and exchange and its properties.
type ExchangeInfo struct {
Name string `json:"name"`
Vhost string `json:"vhost,omitempty"`
Type string `json:"type"`
Durable bool `json:"durable"`
AutoDelete AutoDelete `json:"auto_delete"`
...
}
// QueueInfo represents a queue, its properties and key metrics.
type QueueInfo struct {
// Queue name
Name string `json:"name"`
// Queue type
Type string `json:"type"`
// Virtual host this queue belongs to
Vhost string `json:"vhost,omitempty"`
// Is this queue auto-deleted?
AutoDelete AutoDelete `json:"auto_delete"`
...
}
Contributed by @mkuratczyk.
PR: #207
Contributed by @mkuratczyk.
PR: #206
Contributed by @Sauci.
PR: #200
Contributed by @hjweddie.
PR: #198
This release contains very minor breaking public API changes.
ShovelDefinition.SourceDeleteAfter
type has changed to match that of
ShovelDefinition.DeleteAfter
.
GitHub issue: #197
This release contains minor breaking public API changes.
Federation definition now uses a dedicated type, URISet
, to represent
a set of URIs that will be tried sequentially until the link
can successfully connect and authenticate:
def1 := FederationDefinition{
Uri: URISet{"amqp://hostname/%2f"},
}
URISet
has now replaced ShovelURISet
:
sDef := ShovelDefinition{
SourceURI: URISet([]string{"amqp://127.0.0.1/%2f"}),
SourceQueue: "mySourceQueue",
DestinationURI: ShovelURISet([]string{"amqp://host1/%2f"}),
DestinationQueue: "myDestQueue",
AddForwardHeaders: true,
AckMode: "on-confirm",
DeleteAfter: "never",
}
Contributed by @MrLuje.
GitHub issue: #189
The library now supports global runtime parameters:
// list all global parameters
params, err := rmqc.ListGlobalParameters()
// => []GlobalRuntimeParameter, error
// get a global parameter
p, err := rmqc.GetGlobalParameter("name")
// => *GlobalRuntimeParameter, error
// declare or update a global parameter
resp, err := rmqc.PutGlobalParameter("name", map[string]interface{
endpoints: "amqp://server-name",
})
// => *http.Response, error
// delete a global parameter
resp, err := rmqc.DeleteGlobalParameter("name")
// => *http.Response, error
Contributed by @ChunyiLyu.
GitHub issue: #180
This release contains minor breaking public API changes and targets RabbitMQ 3.8.x (the only supported version at the time of writing) exclusively.
The client now supports modern health check endpoints
(same checks as provided by rabbitmq-diagnostics
):
import (
"github.com/michaelklishin/rabbit-hole/v2"
)
rmqc, _ = NewClient("http://127.0.0.1:15672", "username", "$3KrEƮ")
res1, err1 := rmqc.HealthCheckAlarms()
res2, err2 := rmqc.HealthCheckLocalAlarms()
res3, err3 := rmqc.HealthCheckCertificateExpiration(1, DAYS)
res4, err4 := rmqc.HealthCheckPortListener(5672)
res5, err5 := rmqc.HealthCheckProtocolListener(AMQP091)
res6, err6 := rmqc.HealthCheckVirtualHosts()
res7, err7 := rmqc.HealthCheckNodeIsMirrorSyncCritical()
res8, err8 := rmqc.HealthCheckNodeIsQuorumCritical()
Contributed by Martin @mkrueger-sabio Krueger.
GitHub issue: #173
ListShovelStatus
is a new function that returns a list of
Shovel status reports for a virtual host:
res, err := rmqc.ListShovelStatus("a-virtual-host")
Contributed by Martin @mkrueger-sabio Krueger.
GitHub issue: #178
Shovel definition now uses a dedicated type, ShovelURISet
, to represent
a set of URIs that will be tried sequentially until the Shovel
can successfully connect and authenticate:
sDef := ShovelDefinition{
SourceURI: ShovelURISet([]string{"amqp://host2/%2f", "amqp://host3/%2f"}),
SourceQueue: "mySourceQueue",
DestinationURI: ShovelURISet([]string{"amqp://host1/%2f"}),
DestinationQueue: "myDestQueue",
AddForwardHeaders: true,
AckMode: "on-confirm",
DeleteAfter: "never",
}
Source and destination URI sets are only supported by the Shovel plugin in RabbitMQ 3.8.x.
Originally suggested by @pathcl in #172.
rabbithole.ListDefinitions
is a new function that retuns
exported definitions from a cluster
as a typed Go data structure.
Contributed by @pathcl.
GitHub issue: #170
For forward compatibility with RabbitMQ 3.9, as of this version the list of user tags is returned as an array intead of a comma-separated string.
Compatibility with earlier RabbitMQ HTTP API versions, such as 3.8, has been preserved.
Contributed by Michał @michalkurzeja Kurzeja.
GitHub issue: #177
The client now can list and enable feature flags
using the ListFeatureFlags
and EnableFeatureFlag
functions.
Contributed by David Ansari.
GitHub issue: #167
The delete-after
Shovel parameter now can be deserialised to
a numerical TTL value as well as special string values such as "never"
.
Contributed by Michal @mkuratczyk Kuratczyk.
GitHub issue: #164
Suggested by @mammothbane.
GitHub issue: #158
Suggested by @mammothbane.
GitHub issue: #160
Error responses (40x
with the exception of 404
in response to DELETE
operations,
50x
) HTTP API response errors are now always wrapped intoErrorResponse
,
even if they do not carry a JSON payload.
Contributed by @niclic.
GitHub issue: #155
Contributed by @akurz.
GitHub issue: #155
Contributed by @niclic.
GitHub issue: #154
Runtime Parameter and Federation Upstream Management
Contributed by @niclic.
GitHub issue: #150
Contributed by @niclic.
GitHub issue: michaelklishin/rabbit-hole#152
Contributed by @justabaka.
GitHub issue: #148
See Semantic Go Module Import Versioning for details
GitHub issue: #146
Contributed by Barnaby Shearer.
GitHub issues: #147
Available in RabbitMQ 3.7 and later versions.
Contributed by @kgrieco.
GitHub issue: #144
Contributed by @mazamats.
This library now only supports Go 1.12 and 1.13 (two most recent minor GA releases).
The drop_unroutable
metric is specific to RabbitMQ 3.8.
Contributed by David Ansari and Feroz Jilla.
Contributed by Rajendra N Acharya.
It is now possible to initiate an eager sync of a classic mirrored queue and cancel it.
Contributed by Jaroslaw Bochniak.
GitHub issue: #143
Contributed by Andrew Wang.
Contributed by Thomas Hudry.
GitHub issue: #140
HTTP client configuration now uses http.RoundTripper
.
GitHub issue: #123.
Contributed by Radek Simko.
Contributed by Radek Simko and Gerhard Lazu.
ListExchangeBindings
, ListExchangeBindingsWithSource
, ListExchangeBindingsWithDestination
,
and ListExchangeBindingsBetween
are new functions that list bindings,
in particular between exchanges.
GitHub issue: #109.
It is now possible to specify a password_hash
when creating a user.
Helper functions GenerateSalt
and SaltedPasswordHashSHA256
make this more
straightforward compared to implementing the algorithm
directly.
GitHub issue: #119
A new function, PagedListQueuesWithParameters
, can list queues with pagination support.
GitHub issue: #118
GitHub issue: #115
The client no longer messes with URL.Opaque
as it doesn't seem to
be necessary any more for correct %-encoding of URL path.
GitHub issue: #121
Message stats now include fields such as deliver_get
and redeliver
.
GH issue: #73.
Contributed by Edward Wilde.
rabbithole.NewTLSClient
is a new function which works
much like NewClient
but additionally accepts a transport.
Contributed by @GrimTheReaper.
It is now possible to create federation links over HTTP API.
Contributed by Ryan Grenz.
Most common HTTP API operations (listing and management of vhosts, users, permissions, queues, exchanges, and bindings) are supported by the client.