A package for very simplistic interaction with ActiveMQ REST API.
A configuration needed to publish / consume, see configuration.
Constructs a Configuration based in config params.
A tuple of user/password string pair.
Default TCP port of the REST API of ActiveMQ installations, 8161.
JMS destinations are either queues or topics. Both type have a name.
Host of the ActiveMQ service.
TCP Port of the ActiveMQ REST API service, see defaultPort.
The result of a publication attempt (can only convey success for now).
Given
createMessage function turning the result of a publication into a
message of your choice,it constructs a POST request that will try to publish to ActiveMQ to configured destination.
Given
createMessage function turning the result of a publication into a
message of your choice,it constructs an HTTP GET request that will consume a message from configured destination. Success/failure responses will lead to a message of the type of your choice.
You cannot cancel this request right now, and it looks you should not, either: the little one-shot JMS consumer created for your request will be there, in the context of the REST API servlet within ActiveMQ service, for 30 seconds by default, even if you cancel the HTTP request ("servlet timeout"). That means certain loss of any message published between instant of canceling the HTTP request and that JMS consumer is being destroyed.
Do not use this call directly to organize a polling loop, since network failures and such will result in very busy polling indeed.
Creates a task instead of a command, but otherwise similar to consumeRequest.
You may want to use this version to implement correct message pollling loop with back-off strategy etc.
Most similar to Http.Error, except there is a specific case for not having
any message to be consumed within the timeframe the call lasted (HTTP 204 No Content).
The URL of a Configuration
to be used by publish/consume requests.
The authentication details of a Configuration
to be used by publish/consume requests.
A record carrying parameters for constructing a
Configuration.