The calls an Anypoint MQ step makes to the broker's REST API, for
Alternera.Plugins.AnypointMq. Every path is under
<broker_url>/organizations/<org>/environments/<env>/destinations/<destination>:
- publish:
PUT …/messages/<message id>, a JSON body ofheaders(messageId,messageGroupId,deliveryDelay),propertiesandbody, answered201; - consume:
GET …/messages?pollingTime=…&batchSize=…&lockTtl=…, answered200with a JSON array of messages or204with none; with immediate acks,DELETE …/messageswith[{messageId, lockId}]; - ack:
DELETE …/messages/<message id>with{"lockId": …}; - nack:
DELETE …/messages/<message id>/locks/<lock id>.
An ack's or nack's answer carries status, "successful" or
"failure".
Each call goes out through Plugin.Provisional.Outbound as the step's
proxy user, with the Authorization the tenant's auth profile for its
URL gives (Plugin.Provisional.Credentials.for_call/3), its recording
redacted; a 401 drops that token and calls once more with a new one.
The calls end call_reserve_ms/1 before the step's own time, so a slow
broker fails the step timeout with its call recorded rather than the
runner stopping it.
Summary
Functions
How long before the step's time is up its calls must be done.
url as a broker URL (Wire.check_url/1).
The fingerprint of a resolved call: the operation, method, URL (a publish's generated id and a consume's polling time, which change from run to run, left out), body and proxy user, so a dry run and the real run of the same call agree.
Runs the step's operation: call/3's result.
What a preview says the step would do: the call, as whom and its fingerprint, with nothing sent. A setting that does not resolve is named in place of the call.
Functions
@spec call_reserve_ms(non_neg_integer()) :: non_neg_integer()
How long before the step's time is up its calls must be done.
url as a broker URL (Wire.check_url/1).
The fingerprint of a resolved call: the operation, method, URL (a publish's generated id and a consume's polling time, which change from run to run, left out), body and proxy user, so a dry run and the real run of the same call agree.
@spec run(Alternera.Plugin.Inputs.t(), map(), map()) :: tuple()
Runs the step's operation: call/3's result.
@spec would_call(Alternera.Plugin.Inputs.t(), map(), map()) :: map()
What a preview says the step would do: the call, as whom and its fingerprint, with nothing sent. A setting that does not resolve is named in place of the call.