This is a fully HTTP based Pub/Sub Broker with a goal to simplify system architecture in SOA or Microservice architecture. It aims to solve the inter service communication problem.
Apache License 2.0
18
stars
25
forks
source link
AR-292: Add endpoints for pull based consumer #141
Result holds all the jobs with status JobQueued for a specific consumer. The jobs are sorted in descending order of message priority.
The value of limit will default to 25. The maximum value is 100. A higher value will get clipped to 100.
POST url: /channel/{channel-id}/consumer/{consumer-id}/job/{job-id}
The endpoint requires the X-Broker-Channel-Token and X-Broker-Consumer-Token headers and a body of the form:
Ticket: AR-292
Description
GET url:
/channel/{channel-id}/consumer/{consumer-id}/queued-jobs?limit=25
The endpoint requires the
X-Broker-Channel-Token
andX-Broker-Consumer-Token
headersThe response structure is:
Result
holds all the jobs with statusJobQueued
for a specific consumer. The jobs are sorted in descending order of message priority. The value oflimit
will default to25
. The maximum value is100
. A higher value will get clipped to100
.POST url:
/channel/{channel-id}/consumer/{consumer-id}/job/{job-id}
The endpoint requires the
X-Broker-Channel-Token
andX-Broker-Consumer-Token
headers and a body of the form:Allowed transitions are:
JobQueued
->JobInflight
JobInflight
->JobDelivered
JobInflight
->JobDead
JobDead
->JobInflight
(this transition increasesjob.RetryAttemptCount
by 1)If the current job status and requested next job status are the same, a
202 Accepted
response will be given with no DB change.All other transitions are invalid and will get a
400 Bad Request
response.